Excluding keyspaces or tables from subrange repairs

Exclude entire keyspaces or specific tables within a keyspace from unnecessary repairs during a subrange repair.

Exclude entire keyspaces or specific tables within a keyspace from unnecessary repairs during a subrange repair. Exclude entire keyspaces and all its tables within that keyspace, or exclude specific tables within a keyspace. Doing so reduces use of system resources during the repair process, and can shorten the repair cycle time. The OpsCenter Repair Service already excludes certain system keyspaces from repair by default. Keyspaces with a replication factor of 1 are always automatically excluded from repairs.

Examples of keyspaces that are candidates for exclusion are those for which data loss is not a concern, such as those that summarize data duplicated or rebuilt elsewhere. Additional scenarios for excluding keyspaces might those with be a wide variety in gc_grace_seconds table values, and those keyspaces that are maintained by a custom script.

cluster_name.conf

The location of the cluster_name.conf file depends on the type of installation:
  • Package installations: /etc/opscenter/clusters/cluster_name.conf
  • Tarball installations: install_location/conf/clusters/cluster_name.conf

opscenterd.conf

The location of the opscenterd.conf file depends on the type of installation:
  • Package installations: /etc/opscenter/opscenterd.conf
  • Tarball installations: install_location/conf/opscenterd.conf

Procedure

  1. Open for editing opscenterd.conf for all clusters, or cluster_name.conf for a specific cluster.
  2. Set the following options for your environment requirements in the [repair_service] section:
    [repair_service] ignore_keyspaces
    The list of keyspaces to ignore during a subrange or distributed subrange repair, in addition to system keyspaces or those with a replication factor of 1.
    [repair_service] ignore_tables
    The list of keyspace-qualified table names to exclude during a subrange or distributed subrange repair, including reserved tables, those that reside in a system keyspace, and tables belonging to keyspaces with a replication factor of 1. Example: keyspace1.standard1, keyspace1.standard2.
    The following configuration example excludes both specific keyspace in their entirety (keyspaces 1, 2, and 3); and excludes specific tables within keyspaces (tables X, Y, and Z in keyspaces A and B):
    [repair_service]
    ignore_keyspaces=keyspace1,keyspace2,keyspace3
    ignore_tables=mykeyspaceA.tableX,mykeyspaceA.tableY,mykeyspaceB.tableZ
  3. Restart opscenterd.
    The Repair Service ignores the specified keyspaces or tables during repairs.