You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/03/04 05:07:39 UTC

[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #627: HDDS-3118. Possible deadlock in LockManager.

bharatviswa504 commented on a change in pull request #627: HDDS-3118. Possible deadlock in LockManager.
URL: https://github.com/apache/hadoop-ozone/pull/627#discussion_r387451083
 
 

 ##########
 File path: hadoop-hdds/common/src/test/java/org/apache/hadoop/ozone/lock/TestLockManager.java
 ##########
 @@ -170,4 +175,32 @@ public void testMultiReadWriteLockWithSameResource() throws Exception {
     Assert.assertTrue(gotLock.get());
   }
 
+  @Test
+  public void testConcurrentWriteLockWithDifferentResource() throws Exception {
+    OzoneConfiguration conf = new OzoneConfiguration();
+    final int count = 100;
+    conf.setInt(HDDS_LOCK_MAX_CONCURRENCY, count/4);
 
 Review comment:
   Yes, if we set max pool size to -1, the max total objects created by GenericcObjectPool used in Integer.MAX. I agree we can change to -1, and we shall not see this issue. And we can remove this property, and set it to -1 so that we shall not see this kind of issue when someone mistakenly sets this to a low value and operates on the cluster with very large number of volumes/buckets in parallel. With this way, we shall not see lock contention during acquiring lock.
   
   
   But few questions, right now we take a lock on resource name, so if there is a lock Object which is already in lockPool Object and we put that in the lock map, and we reuse that object. So,  when we operate on more than 100 buckets simultaneously we should see this problem when creating keys or when more than 100 volumes operations are going in parallel we can see some contention in acquiring locks. So, it is not exactly related to handler count in OM. Just trying to understand is the issue is observed on the test cluster?
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org