aweisberg commented on code in PR #3174:
URL: https://github.com/apache/cassandra/pull/3174#discussion_r1572582020


##########
src/java/org/apache/cassandra/repair/messages/RepairOption.java:
##########
@@ -199,21 +198,16 @@ public static RepairOption parse(Map<String, String> 
options, IPartitioner parti
         boolean ignoreUnreplicatedKeyspaces = 
Boolean.parseBoolean(options.get(IGNORE_UNREPLICATED_KS));
         boolean repairPaxos = 
Boolean.parseBoolean(options.get(REPAIR_PAXOS_KEY));
         boolean paxosOnly = Boolean.parseBoolean(options.get(PAXOS_ONLY_KEY));
-        boolean accordRepair = 
Boolean.parseBoolean(options.get(ACCORD_REPAIR_KEY));
+        boolean accordOnly = 
Boolean.parseBoolean(options.get(ACCORD_ONLY_KEY));
+
+        if (paxosOnly && accordOnly)
+            throw new IllegalArgumentException("Cannot repair paxos and repair 
only");
 
         if (previewKind != PreviewKind.NONE)
         {
             Preconditions.checkArgument(!repairPaxos, "repairPaxos must be set 
to false for preview repairs");
             Preconditions.checkArgument(!paxosOnly, "paxosOnly must be set to 
false for preview repairs");
-            Preconditions.checkArgument(!accordRepair, "accordRepair must be 
set to false for preview repairs");
-        }
-
-        if (accordRepair)
-        {
-            Preconditions.checkArgument(!paxosOnly, "paxosOnly must be set to 
false for Accord repairs");
-            Preconditions.checkArgument(previewKind == PreviewKind.NONE, 
"Can't perform preview repair with an Accord repair");
-            Preconditions.checkArgument(!force, "Accord repair only requires a 
quorum to work so force is not supported");

Review Comment:
   Yeah that's true the repair succeeding implies quorum was achieved.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to