Skip to content

CASSANDRA-21552 Force repair should ignore min_repair_interval - #5004

Open
tommystendahl wants to merge 1 commit into
apache:cassandra-5.0from
tommystendahl:cassandra21552-5.0
Open

CASSANDRA-21552 Force repair should ignore min_repair_interval#5004
tommystendahl wants to merge 1 commit into
apache:cassandra-5.0from
tommystendahl:cassandra21552-5.0

Conversation

@tommystendahl

Copy link
Copy Markdown
Contributor

patch by Tommy Stendhal; reviewed by for CASSANDRA-21552

@tommystendahl tommystendahl changed the title Force repair should ignore min_repair_interval CASSANDRA-21552 Force repair should ignore min_repair_interval Aug 7, 2026

// Verify force repair is set
assertTrue(AutoRepairUtils.isForceRepairSetForNode(repairType, myId));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will pass without the changes. We need to invoke AutoRepair.repair() to verify it can run despite min_repair_interval.

SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY));

// Insert with finish_ts > start_ts to simulate a recently completed repair
AutoRepairUtils.insertNewRepairHistory(repairType, myId, now - 1000, now);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note that this function swallows exceptions and only logs them, which is happening in this case. Instead I think we should workaround it for the test (rather than change exception handling) by seeding auto_repair_history directly with QueryProcessor.executeInternal() and assert that took effect. We could refactor the interval decision into a testable method like shouldSkipRepair to help with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants