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


##########
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()
+    {
+        abort(new RuntimeException("TODO"));

Review Comment:
   nit: Cleanup reminder
   
   Would an unchecked `RepairAbortedException` be useful...or is it a waste, 
given we'd still have basically everything we need in the exception message 
anyway?



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