Use indifferent keys for wal_locations
What does this MR do and why?
- Contributes to #364799 (closed)
- Feature flag: #377989 (closed)
Problem
We have a problem with Sidekiq workers when they use stale data for
sticky
and delayed
consistency modes.
Experiment
As @jacobvosmaer-gitlab noticed,
wal_locations
hash might contain string keys after Sidekiq
transformations. Because of that, we can skip location verification and
mark host as up to date while it's not in sync.
I change the location detection logic to accept both symbols and strings. If that modification resolves the problem, then the assumption about string keys is correct.
How to set up and validate locally
It's difficult to reproduce it locally, because it requires a database setup with a replication. But the code should be safe enough to proceed.
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.