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


##########
src/java/org/apache/cassandra/repair/ValidationTask.java:
##########
@@ -70,56 +72,50 @@ public synchronized void treesReceived(MerkleTrees trees)
     {
         if (trees == null)
         {
-            active = false;
             tryFailure(RepairException.warn(desc, previewKind, "Validation 
failed in " + endpoint));
         }
-        else if (active)
-        {
-            trySuccess(new TreeResponse(endpoint, trees));
-        }
-        else
+        else if (!trySuccess(new TreeResponse(endpoint, trees)))
         {
-            // If the task has already been aborted, just release the possibly 
off-heap trees and move along.
+            // If the task is done, just release the possibly off-heap trees 
and move along.
             trees.release();
-            trySuccess(null);
         }
     }
 
+    public synchronized void abort()

Review Comment:
   Does this need to be `synchronized` when it's just calling the other 
`abort(Throwable)`, which is also `synchronized`?



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