dlmarion commented on code in PR #3202:
URL: https://github.com/apache/accumulo/pull/3202#discussion_r1117254686


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ConditionalWriterImpl.java:
##########
@@ -704,11 +704,15 @@ private void invalidateSession(SessionID sessionId, 
HostAndPort location)
         throw new 
TimedOutException(Collections.singleton(location.toString()));
       }
 
-      sleepUninterruptibly(sleepTime, MILLISECONDS);
+      // interrupt checked in while condition
+      UtilWaitThread.sleep(sleepTime, MILLISECONDS);
       sleepTime = Math.min(2 * sleepTime, MAX_SLEEP);
 
     }
-
+    if (Thread.currentThread().isInterrupted()) {
+      throw new TimedOutException(
+          "Interrupted during sleep: " + 
Collections.singleton(location.toString()));
+    }

Review Comment:
   Why not just call Thread.sleep() and throw InterruptedException then? It has 
the same effect with less code.



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

Reply via email to