You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/10/08 02:29:02 UTC

[GitHub] [hadoop] arp7 commented on a change in pull request #1589: HDDS-2244. Use new ReadWrite lock in OzoneManager.

arp7 commented on a change in pull request #1589: HDDS-2244. Use new ReadWrite lock in OzoneManager.
URL: https://github.com/apache/hadoop/pull/1589#discussion_r332313554
 
 

 ##########
 File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/lock/OzoneManagerLock.java
 ##########
 @@ -105,15 +109,66 @@ public OzoneManagerLock(Configuration conf) {
    * should be bucket name. For remaining all resource only one param should
    * be passed.
    */
+  @Deprecated
   public boolean acquireLock(Resource resource, String... resources) {
     String resourceName = generateResourceName(resource, resources);
+    return lock(resource, resourceName, manager::writeLock, WRITE_LOCK);
+  }
+
+  /**
+   * Acquire read lock on resource.
+   *
+   * For S3_BUCKET_LOCK, VOLUME_LOCK, BUCKET_LOCK type resource, same
+   * thread acquiring lock again is allowed.
+   *
+   * For USER_LOCK, PREFIX_LOCK, S3_SECRET_LOCK type resource, same thread
 
 Review comment:
   Why is that?

----------------------------------------------------------------
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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org