mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 20:46:56 +00:00
The CDC generation data can be large and not fit in a single command. This pr splits it into multiple mutations by smartly picking a `mutation_size_threshold` and sending each mutation as a separate group 0 command. Commands are sent sequentially to avoid concurrency problems. Topology snapshots contain only mutation of current CDC generation data but don't contain any previous or future generations. If a new generation of data is being broadcasted but hasn't been entirely applied yet, the applied part won't be sent in a snapshot. New or delayed nodes can never get the applied part in this scenario. Send the entire cdc_generations_v3 table in the snapshot to resolve this problem. A mechanism to remove old CDC generations will be introduced as a follow-up. Closes #13962 * github.com:scylladb/scylladb: test: raft topology: test `prepare_and_broadcast_cdc_generation_data` service: raft topology: print warning in case of `raft::commit_status_unknown` exception in topology coordinator loop raft topology: introduce `prepare_and_broadcast_cdc_generation_data` raft: add release_guard raft: group0_state_machine::merger take state_id as the maximal value from all merged commands raft topology: include entire cdc_generations_v3 table in cdc_generation_mutations snapshot raft topology: make `mutation_size_threshold` depends on `max_command_size` raft: reduce max batch size of raft commands and raft entries raft: add description argument to add_entry_unguarded raft: introduce `write_mutations` command raft: refactor `topology_change` applying