Class RepairTokenRangeSplitter

java.lang.Object
org.apache.cassandra.repair.autorepair.RepairTokenRangeSplitter
All Implemented Interfaces:
IAutoRepairTokenRangeSplitter

public class RepairTokenRangeSplitter extends Object implements IAutoRepairTokenRangeSplitter
The default implementation of IAutoRepairTokenRangeSplitter that attempts to:
  1. Create smaller, consistent repair times
  2. Minimize the impact on hosts
  3. Reduce overstreaming
  4. Reduce number of repairs

To achieve these goals, this implementation inspects SSTable metadata to estimate the bytes and number of partitions within a range and splits it accordingly to bound the size of the token ranges used for repair assignments.

Refer to Auto Repair documentation for this implementation for a more thorough breakdown of this implementation.

While this splitter has a lot of tuning parameters, the expectation is that the established default configuration shall be sensible for all AutoRepairConfig.RepairType's. The following configuration parameters are offered.

Configuration parameters:

  • bytes_per_assignment – Target size (in compressed bytes) for each repair. Throttles incremental repair and anticompaction per schedule after incremental repairs are enabled.
  • max_bytes_per_schedule – Maximum data (in compressed bytes) to cover in a single schedule. Acts as a throttle for the repair cycle workload. Tune this up if writes are outpacing repair, or down if repairs are too disruptive. Alternatively, adjust min_repair_interval.
  • partitions_per_assignment – Maximum number of partitions per repair assignment. Limits the number of partitions in Merkle tree leaves to prevent overstreaming.
  • max_tables_per_assignment – Maximum number of tables to include in a single repair assignment. Especially useful for keyspaces with many tables. Prevents excessive batching of tables that exceed other parameters like bytes_per_assignment or partitions_per_assignment.