szetszwo commented on code in PR #10683:
URL: https://github.com/apache/ozone/pull/10683#discussion_r3608672592
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCreateRequest.java:
##########
@@ -242,8 +242,8 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager, Execut
try {
mergeOmLockDetails(
- ozoneLockStrategy.acquireWriteLock(omMetadataManager, volumeName,
- bucketName, keyName));
+ ozoneLockStrategy.acquireBucketReadLock(omMetadataManager,
+ volumeName, bucketName));
Review Comment:
Why replacing WriteLock with BucketReadLock? It is changing the lock
design. This part should be done in a separated JIRA.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/lock/OBSKeyPathLockStrategy.java:
##########
@@ -89,4 +91,55 @@ public OMLockDetails releaseReadLock(OMMetadataManager
omMetadataManager,
.releaseReadLock(BUCKET_LOCK, volumeName, bucketName));
return omLockDetails;
}
+
+ @Override
+ public OMLockDetails acquireWriteLock(OMMetadataManager omMetadataManager,
+ String volumeName, String bucketName, Collection<String> keyNames)
Review Comment:
Thanks for the info. As in
[Striped.bulkGet](https://guava.dev/releases/19.0/api/docs/com/google/common/util/concurrent/Striped.html#bulkGet(java.lang.Iterable)),
use Iterable is better and don't ever copy the underlying collection.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]