Files
scylladb/service
Asias He e86d39faf0 storage_service: Update peer table only if the peer is part of the ring
Consider the following procedure:

- n1, n2, n3

- n3 is network partitioned from the cluster

- n4 replaces n3

- n3 has the network partition fixed

- n1 learns n3 as NORMAL status and calls
  storage_service::handle_state_normal which in turn calls
  update_peer_info, all columns except tokens column in system.peers are
  written

- n1 restarts before figure out n4 is the new owner and deletes the
  entry for n3 in system.peers

- n3 is removed from gossip by all the nodes in the cluster
  automatically because they detect the collision and removes n3

- n1 restarts, leaving the entry in system.peers for n3 forever

To fix, we can update peer tables only if the node is part of the ring.

Fixes #8729

Closes #8742
2021-05-28 15:03:26 +02:00
..