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


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -1020,17 +1022,29 @@ private SortedMap<TServerInstance,TabletServerStatus> 
gatherTableInformation(
             badServers.remove(server);
           }
         }
-      });
-    }
-    tp.shutdown();
-    try {
-      tp.awaitTermination(Math.max(10000, rpcTimeout / 3), MILLISECONDS);
-    } catch (InterruptedException e) {
-      log.debug("Interrupted while fetching status");
+      }));
+    }
+    final long timeToWaitForCompletion = Math.max(10000, rpcTimeout / 3);
+    long currTime = NANOSECONDS.toMillis(System.nanoTime());
+    final long timeToCancelTasks = currTime + timeToWaitForCompletion;
+    // Wait for all tasks to complete
+    while (!tasks.isEmpty()) {
+      boolean cancel = (currTime > timeToCancelTasks);

Review Comment:
   Thx @EdColeman for the explanation. I believe I have resolved this in 
860fe79.



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