You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sumitagrawl (via GitHub)" <gi...@apache.org> on 2023/05/15 13:57:50 UTC
[GitHub] [ozone] sumitagrawl commented on a diff in pull request #4688: HDDS-8575. Intermittent failure in TestCloseContainerEventHandler.testCloseContainerWithDelayByLeaseManager
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org