maedhroz commented on code in PR #3539:
URL: https://github.com/apache/cassandra/pull/3539#discussion_r1755539891


##########
src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java:
##########
@@ -303,4 +313,20 @@ private void sendFailureResponse(Message<?> respondTo)
         Message<?> reply = 
respondTo.failureResponse(RequestFailureReason.UNKNOWN);
         MessagingService.instance().send(reply, respondTo.from());
     }
+
+    private static boolean acceptMessage(final ValidationRequest 
validationRequest, final InetAddressAndPort from)
+    {
+        boolean outOfRangeTokenLogging = 
StorageService.instance.isOutOfTokenRangeRequestLoggingEnabled();
+        boolean outOfRangeTokenRejection = 
StorageService.instance.isOutOfTokenRangeRequestRejectionEnabled();
+
+        if (!outOfRangeTokenLogging && !outOfRangeTokenRejection)
+            return true;
+
+        return StorageService.instance
+               .getNormalizedLocalRanges(validationRequest.desc.keyspace)
+               .validateRangeRequest(validationRequest.desc.ranges,
+                                     "RepairSession #" + 
validationRequest.desc.parentSessionId,
+                                     "validation request",
+                                     from);

Review Comment:
   TODO: indentation



-- 
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