Skip to content

Refactor RedisClusterValidator to return result hash

Sylvester Chin requested to merge sc1-refactor-validator-output into master

What does this MR do and why?

This MR purely refactors RedisClusterValidator's validate! which raises error on cross-slot occurrences into validate which returns an informative hash of the input command. The hash containing metadata will allow the instrumentation layer to handle errors and logs/metrics.

This MR is a rework of !105302 (merged) which was reverted due to an incident on gstg-cny regarding feature-flags. This MR does not change the behaviour of the code (see that spec/lib/gitlab/instrumentation/redis_interceptor_spec.rb expected behaviour is unchanged and no feature flags are introduced).

Parent issue: gitlab-com/gl-infra/scalability#2005 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading