hemantk-12 commented on code in PR #6012:
URL: https://github.com/apache/ozone/pull/6012#discussion_r1467052864
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -174,8 +174,11 @@ protected KeyArgs resolveBucketAndCheckOpenKeyAcls(KeyArgs
keyArgs,
return resolvedArgs;
}
- protected void validateKeyName(OzoneManager ozoneManager, String keyName)
- throws OMException {
+ protected void validateKeyName(OzoneManager ozoneManager, KeyArgs keyArgs,
+ String keyName) throws OMException {
+ if (keyArgs != null && keyArgs.getKeyName() != null) {
Review Comment:
Sorry if I was not clear earlier. I meant
`OmUtils.verifyKeyNameWithSnapshotReservedWord()` should be called on `keyName`
not `keyArgs.getKeyName()`. Because for `renameKey`, we should be validating
that `toKeyName` doesn't contains snapshot reserved key word `.snapshot`.
--
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]