Andrey Yarovoy created HDDS-14454:
-------------------------------------

             Summary: XceiverClientGrpc.close() can take up to 60 minutes * 
number of channels
                 Key: HDDS-14454
                 URL: https://issues.apache.org/jira/browse/HDDS-14454
             Project: Apache Ozone
          Issue Type: Bug
          Components: common
            Reporter: Andrey Yarovoy


XceiverClientGrpc.close() can take up to 60 minutes * number of channels:

{code:java}
@Override public synchronized void close() {
 closed = true;
 for (ManagedChannel channel : channels.values()) {
   channel.shutdownNow();
   try {
     channel.awaitTermination(60, TimeUnit.MINUTES); 
   } catch (InterruptedException e) { 
     LOG.error("InterruptedException while waiting for channel termination", e);
     // Re-interrupt the thread while catching InterruptedException
     Thread.currentThread().interrupt(); 
   } 
 } 
} {code}
1. it should use hannel.shutdown() instead of hannel.shutdownNow()

2. Instead of waiting for for shutdown of each channel in the loop it should 
call shutdown() for each channel and then in the second loop check that all the 
channels are terminated within the timeout.

3. 60 minutes is way too long, in GrpcOmTransport.shutdown() we use 5 second 
timeout.

please also see https://issues.apache.org/jira/browse/HDDS-14430



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to