arp7 commented on a change in pull request #949: HDDS-1672. Improve locking in
OzoneManager.
URL: https://github.com/apache/hadoop/pull/949#discussion_r295932106
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -2564,6 +2564,9 @@ public void createS3Bucket(String userName, String
s3BucketName)
}
metrics.incNumBucketCreates();
try {
+ metadataManager.getLock().acquireS3BucketLock(s3BucketName);
+ metadataManager.getLock().acquireVolumeLock(
Review comment:
If getting the volume lock fails, the finally block will still attempt to
release it. Same with the S3 bucket lock.
You will either need to use nested try-catch or a boolean flag per lock
indicating it was successfully acquired.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]