rickyma commented on code in PR #1736:
URL:
https://github.com/apache/incubator-uniffle/pull/1736#discussion_r1610186035
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -946,6 +948,21 @@ public void close() {
heartBeatExecutorService.shutdownNow();
coordinatorClients.forEach(CoordinatorClient::close);
dataTransferPool.shutdownNow();
+ // wait for all services graceful termination
+ awaitExecutorServiceTermination(5000, heartBeatExecutorService,
dataTransferPool, unregisterExecutorService);
+ }
+
+ private void awaitExecutorServiceTermination(long timeoutMs,
ExecutorService... services) {
+ for (ExecutorService service : services) {
+ try {
+ if (service == null) continue;
+ if (!service.awaitTermination(timeoutMs, TimeUnit.MILLISECONDS)) {
+ LOG.warn("Executor service did not terminate within timeout: {}",
service);
Review Comment:
The variable here is wrong.
--
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]