EdColeman commented on code in PR #3202:
URL: https://github.com/apache/accumulo/pull/3202#discussion_r1117258703
##########
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:
This logs and resets the interrupt flag. Throwing an existing exception
delegates to exception handling in place. Throwing InterruptException would
require more changes.
--
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]