diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java index fa4f5c652fc..8178abfed32 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java @@ -174,7 +174,7 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn OzoneFileStatus fileStatus = getOzoneKeyStatus( ozoneManager, omMetadataManager, volumeName, bucketName, keyName); addKeyToAppropriateList(omKeyInfoList, omKeyInfo, dirList, - fileStatus, deleteKeyArgs.getFromS3G()); + fileStatus, deleteKeyArgs.hasFromS3G() && deleteKeyArgs.getFromS3G()); } catch (Exception ex) { deleteStatus = false; LOG.error("Acl check failed for Key: {}", objectKey, ex);