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


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftTransportPool.java:
##########
@@ -76,7 +76,8 @@ private ThriftTransportPool(LongSupplier maxAgeMillis) {
         final long minNanos = MILLISECONDS.toNanos(250);
         final long maxNanos = MINUTES.toNanos(1);
         long lastRun = System.nanoTime();
-        while (!connectionPool.shutdown) {
+        // loop often, to detect shutdowns quickly
+        while (!connectionPool.awaitShutdown(250)) {

Review Comment:
   I wonder if a CountDownLatch would be a better solution here. It would 
replace the `shutdown` variable and the  `shutdownMonitor` object .



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