1
votes

Suppose we have 3 node cluster in Cassandra and replication factor is 2.

During the compaction process, the replicated data of some other primary node also get compacted during the node compaction process.

For example, If node 1 is range partitioned for 1-10 and node 2 and node 3 are replicas for node 1. When we initiate the compaction process on node 2, will the SS table of node 2 have replicated the replication data of node 1?

TIA

1

1 Answers

2
votes

The data replication happens either in real-time, when you write data, or via hints, if node was offline, or via explicit repair operation (although repair is the special type of compaction).

Compaction process is independent on every node - there are different factors that could lead to flushes happening on different times, different size of the data, etc. Compaction of data on one node won't send data to other nodes, until it's a validation compaction triggered via repair.

I recommend to read DSE Architecture guide, that explains how data is replicated, etc.

P.S. in your example, if you have RF=2, then only one node will be the replica for Node1...