Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autorepair v2 framework #3306

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

jaydeepkumar1984
Copy link
Contributor

  • AutoRepir v2 framework that covers both FR & IR
  • An interface with a default implementation for TokenRange calculation
  • Enable/Disable flag as a CQL Table property

ColumnFamilyStore columnFamilyStore = keyspace.getColumnFamilyStore(tableName);
if (columnFamilyStore.metadata().params.disableAutomatedRepair)
{
logger.info("Repair is disabled for keyspace {} for tables: {}", keyspaceName, tableName);
Copy link

Choose a reason for hiding this comment

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

Suggested change
logger.info("Repair is disabled for keyspace {} for tables: {}", keyspaceName, tableName);
logger.info("Repair is disabled for keyspace {} for table: {}", keyspaceName, tableName);


public void setRepairMinIntervalInHours(RepairType repairType, int repairMinFrequencyInHours)
{
repair_type_overrides.get(repairType).min_repair_interval_in_hours = repairMinFrequencyInHours;
Copy link

Choose a reason for hiding this comment

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

JFYI, there's a bug in these setters. If you provide a config in cassandra.yaml such as the following

auto_repair:
  repair_type_overrides:
    full:
      enabled: true

repair_type_overrides.get("incremental") will be null and we'll get an NPE if we call a setter with incremental repair type

Copy link

Choose a reason for hiding this comment

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

Though this only affects nodetool functionality

@jaydeepkumar1984 jaydeepkumar1984 force-pushed the auto_repair_v2 branch 2 times, most recently from e225d41 to 27dcbf2 Compare May 17, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants