Skip to content

CASSANDRA-21552 Force repair should ignore min_repair_interval - #5004

Open
tommystendahl wants to merge 6 commits into
apache:cassandra-5.0from
tommystendahl:cassandra21552-5.0
Open

CASSANDRA-21552 Force repair should ignore min_repair_interval#5004
tommystendahl wants to merge 6 commits 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
Comment thread test/unit/org/apache/cassandra/repair/autorepair/AutoRepairTest.java Outdated
driftx
driftx approved these changes Aug 10, 2026
@tommystendahl

Copy link
Copy Markdown
Contributor Author

I created a new test case for end-to-end using AutoRepair.instance.repair(repairType) and if that throws the test fails.

@tommystendahl
tommystendahl requested a review from driftx August 11, 2026 09:50
@tommystendahl
tommystendahl requested a review from driftx August 11, 2026 11:31
@@ -196,7 +196,8 @@ public void repair(AutoRepairConfig.RepairType repairType)
UUID myId = Gossiper.instance.getHostId(FBUtilities.getBroadcastAddressAndPort());

// If it's too soon to run repair, don't bother checking if it's our turn.

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.

@tommystendahl could you please move this comment where it should be? If you read how it is now, that comment seems to be out of place because we changed the implementation but the comment stayed and it is confusing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When I did it it made sense to me to leave the comment as it was but looking again I can see how it could be confusing but I don't think just moving it will help. I added an new comment for tooSoonToRunRepair in the same way as I did for shouldSkipRepairDueToInterval and I rewrote this comment.

Comment thread src/java/org/apache/cassandra/repair/autorepair/AutoRepairUtils.java Outdated
assertTrue("repair_finish_ts should advance after force repair runs, but was "
+ finishTimeBefore + " -> " + finishTimeAfter,
finishTimeAfter > finishTimeBefore);

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.

Pleae verify that

assertFalse(AutoRepair.instance.shouldSkipRepairDueToInterval(repairType, repairState, config, myId));


// Record the finish time before repair runs
long finishTimeBefore = AutoRepairUtils.getLastRepairTimeForNode(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.

Pleae verify that

assertTrue(AutoRepair.instance.shouldSkipRepairDueToInterval(repairType, repairState, config, myId));

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.

4 participants