mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
ERMs created in `calculate_vnode_effective_replication_map` have RF computed based on the old token metadata during a topology change. The reading replicas, however, are computed based on the new token metadata (`target_token_metadata`) when `read_new` is true. That can create a mismatch for EverywhereStrategy during some topology changes - RF can be equal to the number of reading replicas +-1. During bootstrap, this can cause the `everywhere_replication_strategy::sanity_check_read_replicas` check to fail in debug mode. We fix the check in this commit by allowing one more reading replica when `read_new` is true. Fixes https://scylladb.atlassian.net/browse/SCYLLADB-1147 Closes scylladb/scylladb#29150