This is an automated email from the ASF dual-hosted git repository. bdeggleston pushed a commit to branch cep-15-accord in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cep-15-accord by this push: new f6e9d928a1 Don't run incremental repairs for consensus only repairs f6e9d928a1 is described below commit f6e9d928a1dbbf45f22188dff8b5509a7a5e85bc Author: Blake Eggleston <bl...@ultrablake.com> AuthorDate: Mon Jun 17 16:28:05 2024 -0700 Don't run incremental repairs for consensus only repairs Patch by Blake Eggleston; reviewed by David Capwell for CASSANDRA-19717 --- src/java/org/apache/cassandra/repair/RepairCoordinator.java | 2 +- src/java/org/apache/cassandra/repair/messages/RepairOption.java | 5 +++++ test/unit/org/apache/cassandra/repair/FuzzTestBase.java | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/cassandra/repair/RepairCoordinator.java b/src/java/org/apache/cassandra/repair/RepairCoordinator.java index b0bae4f07c..8d0833ef44 100644 --- a/src/java/org/apache/cassandra/repair/RepairCoordinator.java +++ b/src/java/org/apache/cassandra/repair/RepairCoordinator.java @@ -513,7 +513,7 @@ public class RepairCoordinator implements Runnable, ProgressEventNotifier, Repai { task = new PreviewRepairTask(this); } - else if (state.options.isIncremental()) + else if (state.options.isIncremental() && !state.options.isConsensusOnly()) { task = new IncrementalRepairTask(this); } diff --git a/src/java/org/apache/cassandra/repair/messages/RepairOption.java b/src/java/org/apache/cassandra/repair/messages/RepairOption.java index e7ff9bc6c9..88dcf586d8 100644 --- a/src/java/org/apache/cassandra/repair/messages/RepairOption.java +++ b/src/java/org/apache/cassandra/repair/messages/RepairOption.java @@ -448,6 +448,11 @@ public class RepairOption return accordOnly; } + public boolean isConsensusOnly() + { + return paxosOnly() || accordOnly(); + } + public boolean isConsensusMigration() { return isConsensusMigration; diff --git a/test/unit/org/apache/cassandra/repair/FuzzTestBase.java b/test/unit/org/apache/cassandra/repair/FuzzTestBase.java index c97fc8b28a..f83645e485 100644 --- a/test/unit/org/apache/cassandra/repair/FuzzTestBase.java +++ b/test/unit/org/apache/cassandra/repair/FuzzTestBase.java @@ -528,7 +528,7 @@ public abstract class FuzzTestBase extends CQLTester.InMemory } private enum RepairType - {FULL, IR} + {FULL, IR, PAXOS_ONLY, ACCORD_ONLY} private enum PreviewType {NONE, REPAIRED, UNREPAIRED} @@ -565,6 +565,12 @@ public abstract class FuzzTestBase extends CQLTester.InMemory case FULL: args.add("--full"); break; + case PAXOS_ONLY: + args.add("--paxos-only"); + break; + case ACCORD_ONLY: + args.add("--accord-only"); + break; default: throw new AssertionError("Unsupported repair type: " + type); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org