Skip to content

CASSANDRA-21066 Full Repair for Tracked Keyspaces#4565

Closed
maedhroz wants to merge 1 commit intoapache:cep-45-mutation-trackingfrom
maedhroz:CASSANDRA-21066-maedhroz
Closed

CASSANDRA-21066 Full Repair for Tracked Keyspaces#4565
maedhroz wants to merge 1 commit intoapache:cep-45-mutation-trackingfrom
maedhroz:CASSANDRA-21066-maedhroz

Conversation

@maedhroz
Copy link
Contributor

@maedhroz maedhroz commented Jan 15, 2026

Tracked keyspaces cannot accept new data without first registering it in
the log. Any unreconciled data that isn't present in the log will break
read monotonicity, since mutation tracking uses a single data read and
can only read reconcile mutation IDs that are present in the log. For
more information about how bulk transfers work on tracked keyspaces, see
TrackedImportTransfer.

Full repair sync tasks also deliver data to replicas, and require
integration with the log just like imports do. For more details on a
read anomaly that could happen without integration with the bulk
transfer machinery, see
TrackedKeyspaceRepairSupportTest#testFullRepairPartiallyCompleteAnomaly.

The general design of this integration is to give repair SyncTasks the
same two-phase commit as import transfers, where we stream SSTables to a
pending/ directory, then once sufficient streams complete successfully,
we "activate" those streams and move them out of the pending directory
and into the live set.

The first step is to ensure that each SyncTask is aligned to a single
Mutation Tracking shard, by splitting SyncTasks along the shard
boundaries. Each SyncTask will then stream data within a single shard,
and permit us to assign a single transfer ID to each SyncTask.

Each participant in a repair may receive different SyncTasks (or none at
all, if they're already in-sync). This means that ActivationRequest must be flexible
enough to support transfers with multiple plan IDs or none at all.

@maedhroz maedhroz force-pushed the CASSANDRA-21066-maedhroz branch from 9edc6c2 to d74f11b Compare January 15, 2026 19:29
@maedhroz maedhroz force-pushed the CASSANDRA-21066-maedhroz branch from 9ce9758 to 673e86f Compare January 24, 2026 00:51
@maedhroz maedhroz force-pushed the CASSANDRA-21066-maedhroz branch from f876476 to 7781a20 Compare January 27, 2026 03:40

import org.junit.Test;

public class TrackedNonZeroCopyRepairTransferTest extends TrackedRepairTransferTest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests, and their ZCS equivalents could probably just share a cluster and create a keysapce per test.

@maedhroz maedhroz force-pushed the CASSANDRA-21066-maedhroz branch from a5fe898 to 4492a7f Compare February 5, 2026 16:49
@aratno aratno self-requested a review February 7, 2026 13:36
@maedhroz maedhroz force-pushed the CASSANDRA-21066-maedhroz branch 6 times, most recently from 5cc0aa3 to 8d4ebae Compare February 13, 2026 17:54
Tracked keyspaces cannot accept new data without first registering it in
the log. Any unreconciled data that isn't present in the log will break
read monotonicity, since mutation tracking uses a single data read and
can only read reconcile mutation IDs that are present in the log.

Full repair sync tasks also deliver data to replicas, and require
integration with the log just like imports do. The general design of this
integration is to give repair SyncTasks the same two-phase commit as
import transfers, where we stream SSTables to a pending directory, then
once sufficient streams complete successfully, we "activate" those
streams and move them out of the pending directory and into the live set.

patch by Caleb Rackliffe; reviewed by Abe Ratnofsky for CASSANDRA-21066

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Abe Ratnofsky <abe@aber.io>
@maedhroz maedhroz force-pushed the CASSANDRA-21066-maedhroz branch from 8d4ebae to 74e6c91 Compare February 13, 2026 18:06
@maedhroz
Copy link
Contributor Author

Committed as d482690

@maedhroz maedhroz closed this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants