You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/08/20 11:48:34 UTC

[GitHub] [cassandra] blerer commented on a change in pull request #1151: Ignore repair requests in mixed mode

blerer commented on a change in pull request #1151:
URL: https://github.com/apache/cassandra/pull/1151#discussion_r692805466



##########
File path: test/distributed/org/apache/cassandra/distributed/upgrade/README.txt
##########
@@ -0,0 +1,16 @@
+To run jvm upgrade tests first checkout each version and build it's dtest-jar target. Keep those artifacts, you'll need them to run the upgrade tests.
+Remeber to recreate the dtest-jar if you change some code, as the tests exercises the jars, not the .java code

Review comment:
       Typo `Remeber` -> `Remember`

##########
File path: src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java
##########
@@ -45,8 +46,24 @@
 public class RepairMessageVerbHandler implements IVerbHandler<RepairMessage>
 {
     private static final Logger logger = LoggerFactory.getLogger(RepairMessageVerbHandler.class);
+
+    @VisibleForTesting
+    public static boolean shouldIgnoreRepairRequest(final MessageIn<RepairMessage> message)
+    {
+        return message.version < MessagingService.VERSION_30 || message.version > MessagingService.VERSION_3014;

Review comment:
       It would be nice to have a comment explaining that logic.

##########
File path: src/java/org/apache/cassandra/repair/RepairJobDesc.java
##########
@@ -120,7 +120,7 @@ public RepairJobDesc deserialize(DataInputPlus in, int version) throws IOExcepti
             String keyspace = in.readUTF();
             String columnFamily = in.readUTF();
 
-            int nRanges = in.readInt();
+            int nRanges = version >= MessagingService.VERSION_30 ? in.readInt() : 1;

Review comment:
       It would be nice to have a comment explaining that logic.




-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org