Excluding keyspaces or tables from subrange repairs

About this task

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.

Procedure

  1. Locate the opscenterd.conf file. The location of this file depends on the type of installation:

    • Package installations: /etc/opscenter/opscenterd.conf

    • Tarball installations: install_location/conf/opscenterd.conf

  2. Locate the cluster_name.conf file. The location of this file depends on the type of installation:

    • Package installations: /etc/opscenter/clusters/cluster_name.conf

    • Tarball installations: install_location/conf/clusters/cluster_name.conf

  3. Open for editing opscenterd.conf for all clusters, or cluster_name.conf for a specific cluster.

  4. 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.

    • [repair_service] ignore_tables

      The list of keyspace and tables to exclude during a subrange repair. Not applicable to distributed subrange repairs.

      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
  5. Restart opscenterd.

    The Repair Service ignores the specified keyspaces or tables during repairs. The keyspaces and tables configured to ignore never appear in the Table Repair Tasks pane in the Repair Service Status. The ignored keyspaces and tables are visible in the Ignored Keyspaces or Ignored Tables sections of the Excluded Keyspaces and Tables dialog available from the Repair Service Status dashboard. See View keyspaces and tables excluded from repairs.

    View-only dialog displaying all keyspaces and tables excluded from subrange repairs

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com