Files
scylladb/service
Kamil Braun 0bff96a611 Merge 'gossip: add group0_id attribute to gossip_digest_syn' from Mikołaj Grzebieluch
Motivation:

The user can bootstrap 3 different clusters and then connect them
(#14448). When these clusters start gossiping, their token rings will be
merged, but there will be 3 different group 0s in there. It results in a
corrupted cluster.

We need to prevent such situations from happening in clusters which
don't use Raft-based topology.

-------

Gossiper service sets its group0 id on startup if it is stored in
`scylla_local` or sets it during joining group0.

Send group0_id (if it is set) when the node tries to initiate the gossip
round. When a node gets gossip_digest_syn it checks if its group0 id
equals the local one and if not, the message is discarded.

Fixes #14448

Performed manual tests with the following scenario:
1. setup a cluster of two nodes (one compiled with and one without this patch)
2. setup a new node
3. create a basic keyspace and table
4. execute simple select and insert queries

Tested 4 scenarios: the seed node was with or without this patch, and the third node was with or without this patch.
These tests didn't detect any errors.

Closes #15004

* github.com:scylladb/scylladb:
  tests: raft: cluster of nodes with different group0 ids
  gossip: add group0_id attribute to gossip_digest_syn
2023-08-29 16:41:29 +02:00
..