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 2022/06/27 15:21:16 UTC

[GitHub] [ozone] tanvipenumudy opened a new pull request, #3560: HDDS-6581. Introduce KEY_PATH_LOCK in OMKeyCreateRequest class

tanvipenumudy opened a new pull request, #3560:
URL: https://github.com/apache/ozone/pull/3560

   ## What changes were proposed in this pull request?
   
   This task is intended to introduce the _`KEY_PATH_LOCK`_ feature (via `OBSKeyPathLockStrategy` - a concrete class implementation of the `OMLockStrategy` interface that helps in changing the behavior of the locking mechanism - `OBSKeyPathLockStrategy`/`RegularBucketLockStrategy` at runtime based on the configuration flags) in the class `OMKeyCreateRequest`. 
   
   The _`KEY_PATH_LOCK`_ feature shall be disabled by default using the configuration `ozone.om.key.path.lock.enabled` (= _false_).
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6581
   
   ## How was this patch tested?
   
   Added UTs.
   


-- 
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


[GitHub] [ozone] tanvipenumudy commented on a diff in pull request #3560: HDDS-6581. Introduce KEY_PATH_LOCK in OMKeyCreateRequest class

Posted by GitBox <gi...@apache.org>.
tanvipenumudy commented on code in PR #3560:
URL: https://github.com/apache/ozone/pull/3560#discussion_r941156201


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/lock/OzoneLockStrategy.java:
##########
@@ -31,19 +31,16 @@
  */
 public interface OzoneLockStrategy {
   boolean acquireWriteLock(OMMetadataManager omMetadataManager,
-                           OzoneManagerLock.Resource resource,
                            String volumeName, String bucketName, String keyName)

Review Comment:
   Thank you for the suggestion, made the necessary changes!



-- 
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


[GitHub] [ozone] rakeshadr merged pull request #3560: HDDS-6581. Introduce KEY_PATH_LOCK in OMKeyCreateRequest class

Posted by GitBox <gi...@apache.org>.
rakeshadr merged PR #3560:
URL: https://github.com/apache/ozone/pull/3560


-- 
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


[GitHub] [ozone] rakeshadr commented on a diff in pull request #3560: HDDS-6581. Introduce KEY_PATH_LOCK in OMKeyCreateRequest class

Posted by GitBox <gi...@apache.org>.
rakeshadr commented on code in PR #3560:
URL: https://github.com/apache/ozone/pull/3560#discussion_r941143770


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/lock/OzoneLockStrategy.java:
##########
@@ -31,19 +31,16 @@
  */
 public interface OzoneLockStrategy {
   boolean acquireWriteLock(OMMetadataManager omMetadataManager,
-                           OzoneManagerLock.Resource resource,
                            String volumeName, String bucketName, String keyName)

Review Comment:
   @tanvipenumudy IMO, Exception throws clause is not required in the release function/API. In general, releasing logic should handle all the exceptions within itself otherwise it can leads to leaking of resources. For example, what happens if any exception thrown and lock is not released, which can leads to resource leaks, isn't it.
   
   Could you please remove the `throws IOException` from the release lock interface and its impl classes. Thanks!
   
   ```
   OzoneLockStrategy.java 
   
     void releaseWriteLock(OMMetadataManager omMetadataManager,
                           OzoneManagerLock.Resource resource, String volumeName,
                           String bucketName, String keyName);
   
     void releaseReadLock(OMMetadataManager omMetadataManager,
                          OzoneManagerLock.Resource resource, String volumeName,
                          String bucketName, String keyName);
   ```



-- 
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