Skip to content

Use indifferent keys for wal_locations

Vasilii Iakliushin requested to merge 364799_fix_wal_location_detection into master

What does this MR do and why?

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.

Edited by Vasilii Iakliushin

Merge request reports

Loading