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



##########
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:
       Here I will make sure that all buckets I used are locked to ensure 
compatibility with ofs.




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