xiaoyuyao commented on a change in pull request #814:
URL: https://github.com/apache/hadoop-ozone/pull/814#discussion_r429344837



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyDeleteRequest.java
##########
@@ -111,51 +114,53 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
     boolean acquiredLock = false;
     OMClientResponse omClientResponse = null;
     Result result = null;
+    List<OmKeyInfo> omKeyInfoList= new ArrayList<>();
     try {
-      // check Acl
-      checkKeyAcls(ozoneManager, volumeName, bucketName, keyName,
-          IAccessAuthorizer.ACLType.DELETE, OzoneObj.ResourceType.KEY);
-
-      String objectKey = omMetadataManager.getOzoneKey(
-          volumeName, bucketName, keyName);
-
+      if (keyNameList.size() == 0) {
+        throw new OMException("Key not found", KEY_NOT_FOUND);
+      }
       acquiredLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK,

Review comment:
       This is OK with o3fs as we will mount a single bucket. In the context of 
ofs where you can have multiple volume buckets under the root. This lock can't 
guarantee atomic across all the delete keyname list.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to