CASSANDRA-21552 Force repair should ignore min_repair_interval - #5004
Open
tommystendahl wants to merge 1 commit into
Open
CASSANDRA-21552 Force repair should ignore min_repair_interval#5004tommystendahl wants to merge 1 commit into
tommystendahl wants to merge 1 commit into
Conversation
driftx
requested changes
Aug 7, 2026
|
|
||
| // Verify force repair is set | ||
| assertTrue(AutoRepairUtils.isForceRepairSetForNode(repairType, myId)); | ||
| } |
Contributor
There was a problem hiding this comment.
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); |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
patch by Tommy Stendhal; reviewed by for CASSANDRA-21552