Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.10.1
-
None
-
None
Description
In our cluster we have observed when close command is issued to Datanode, It is stuck indefinitely waiting for connections map to be empty for some reason the map is not empty even after the connections have closed. code link.
Instead of infinite wait a timed wait (based on retries or timeout) would enable to shutdown the datanode in timely manner.
for (Connection conn : connections.values()) { conn.interrupt(); conn.interruptConnectingThread(); } // wait until all connections are closed while (!connections.isEmpty()) { try { Thread.sleep(STOP_SLEEP_TIME_MS); } catch (InterruptedException e) { } }