sumitagrawl commented on code in PR #4688: URL: https://github.com/apache/ozone/pull/4688#discussion_r1193883564
########## hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/lease/LeaseManager.java: ########## @@ -45,8 +49,8 @@ private final String name; private final long defaultTimeout; - private final Object monitor = new Object(); private Map<T, Lease<T>> activeLeases; + private BlockingQueue<T> leaseKeyBlockingQueue; Review Comment: @szetszwo Thanks for review, I have done changes as per patch, but added extra release in shutdown() as possibility for concurrency issue. i.e. 1. shutdown --> disable MonitorThread (set running to false) 2. interrupt Monitor thread For step 2, if MonitorThread waiting, then interrupt will work else ignored. So later moves to waiting for semaphore, then there is no way to exist thread. So added extra "semaphore.release()" in shutdown to ensure exit from tryAcquire() wait in above case. -- 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]
