Remove fallback reads for MultiStore
What does this MR do and why?
As discussed in gitlab-com/gl-infra/scalability#2161 (comment 1263910058), fallback reads can be removed from MultiStore
to simplify it for SRE usage. The current behaviour of fallback was difficult to reason about and un-intuitive during the migration of repository-cache gitlab-com/gl-infra/production#8309 (closed).
This MR removes the fallback read behaviour in MultiStore
, simplifies the specs and updates documentation.
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
- Setup feature flags
Feature.enable(:use_primary_store_as_default_for_sidekiq_status)
Feature.enable(:use_primary_and_secondary_stores_for_sidekiq_status)
- Set up redis values
[8] pry(main)> Gitlab::Redis::Queues.with{|c| c.set('testvalue', 'queue')}
=> "OK"
- Verify that no fallback reads are performed
[16] pry(main)> Gitlab::Redis::SidekiqStatus.with {|c| c.get('testvalue')}
=> nil
[17] pry(main)> Feature.disable(:use_primary_store_as_default_for_sidekiq_status)
=> true
[18] pry(main)> Gitlab::Redis::SidekiqStatus.with {|c| c.get('testvalue')}
=> "queue"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sylvester Chin