cassandra/test
Aparna Naik 19d4f1b087 CEP-45: Incremental Repair integration w/Mutation Tracking
Implement mutation tracking repair as a new repair task that replaces
Merkle tree validation and streaming for tracked keyspaces. Instead of
building hash trees and comparing data, MutationTrackingSyncCoordinator
sends MT_SYNC_REQ to all participants to collect their witnessed offsets,
then waits for background offset broadcasts to confirm all replicas have
reconciled to those target offsets.

Key changes:

- Add MutationTrackingIncrementalRepairTask that creates per-range
  MutationTrackingSyncCoordinator instances and blocks until all
  shards reach the target reconciled offsets or timeout.

- Add MT_SYNC_REQ/MT_SYNC_RSP verbs and MutationTrackingSyncRequest/
  MutationTrackingSyncResponse messages for the repair protocol to
  establish a happens-before relationship between repair start and
  offset collection.

- RepairCoordinator.create() factory method snapshots TCM state to
  decide whether to use mutation tracking repair and flips incremental
  to false (skipping anti-compaction) when MT is active without
  migration.

- Support mutation tracking migration: during untracked->tracked
  migration, run incremental repair first (for pre-migration data),
  then MT sync. KeyspaceMigrationInfo validates that repair ranges
  don't partially overlap pending migration ranges and routes
  streaming/SSTable finalization through the correct tracked vs
  untracked path.

- Temporarily route read repair mutations through the untracked write
  path during migration by adding isReadRepair flag to Mutation and
  bypassing migration routing checks in ReadRepairVerbHandler and
  CassandraKeyspaceWriteHandler. This is a stopgap; CASSANDRA-21252
  will roll back this approach and handle read repair properly.

- Add offset collection APIs to CoordinatorLog, Node2OffsetsMap, and
  Shard for computing union and intersection of witnessed offsets
  scoped to specific participant host IDs (supporting --force with
  dead node exclusion).

- Add configurable mutation_tracking_sync_timeout (default 2m) with
  JMX get/set on StorageServiceMBean.

- Fix ActiveRepairService to use tryFailure() instead of setFailure()
  to avoid double-completion exceptions during concurrent repair
  failures.

Co-Authored-By: Ariel Weisberg <aweisberg@apple.com>
2026-04-14 11:48:19 -04:00
..
anttasks/org/apache/cassandra/anttasks Optionally fail writes when SAI refuses to index a term value exceeding a configured maximum size 2024-04-17 11:12:42 -05:00
bin JMH improvements - faster build and async profiler 2023-09-25 12:39:36 +02:00
burn/org/apache/cassandra Refactor EncryptionOptions to use client / server encryption options builders 2025-04-23 09:27:09 +02:00
conf CEP-45: Add feature flag for Mutation Tracking 2026-03-10 11:58:02 -05:00
data CEP-45: Full Repair Support for Tracked Keyspaces 2026-02-13 13:41:45 -06:00
distributed/org/apache/cassandra CEP-45: Incremental Repair integration w/Mutation Tracking 2026-04-14 11:48:19 -04:00
harry/main/org/apache/cassandra/harry SERIAL read/write support for Witnesses and Mutation Tracking 2026-02-19 12:50:30 -05:00
long/org/apache/cassandra CEP-45: Add feature flag for Mutation Tracking 2026-03-10 11:58:02 -05:00
memory/org/apache/cassandra/db/compaction Explicitly localize strings to Locale.US for internal implementation 2024-10-29 08:58:01 +01:00
microbench/org/apache/cassandra/test/microbench Fully reconciled SSTable promotion 2025-08-13 23:24:24 -05:00
resources Migrate all nodetool commands from airline to picocli 2025-07-26 18:19:18 +02:00
simulator CEP-45: Add feature flag for Mutation Tracking 2026-03-10 11:58:02 -05:00
unit CEP-45: Incremental Repair integration w/Mutation Tracking 2026-04-14 11:48:19 -04:00