mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
Currently the replacing node sets the status as STATUS_UNKNOWN when it starts gossip service for the first time before it sets the status to HIBERNATE to start the replacing operation. This introduces the following race: 1) Replacing node using the same IP address of the node to be replaced starts gossip service without setting the gossip STATUS (will be seen as STATUS_UNKNOWN by other nodes) 2) Replacing node waits for gossip to settle and learns status and tokens of existing nodes 3) Replacing node announces the HIBERNATE STATUS. After Step 1 and before Step 3, existing nodes will mark the replacing node as UP, but haven't marked the replacing node as doing replacing yet. As a result, the replacing node will not be excluded from the read replicas and will be considered a target node to serve CQL reads. To fix, we make the replacing node avoid responding echo message when it is not ready. Fixes #7312 Closes #7714