jojochuang commented on code in PR #6219:
URL: https://github.com/apache/ozone/pull/6219#discussion_r1499762913
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java:
##########
@@ -250,13 +250,12 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
omBucketInfo.getDefaultReplicationConfig(),
ozoneManager);
- validateEncryptionKeyInfo(omBucketInfo, keyArgs);
-
omKeyInfo = prepareKeyInfo(omMetadataManager, keyArgs, dbKeyInfo,
keyArgs.getDataSize(), locations, getFileEncryptionInfo(keyArgs),
ozoneManager.getPrefixManager(), omBucketInfo, pathInfo,
trxnLogIndex,
ozoneManager.getObjectIdFromTxId(trxnLogIndex),
ozoneManager.isRatisEnabled(), repConfig);
+ validateEncryptionKeyInfo(omBucketInfo, keyArgs);
Review Comment:
moving this validation after prepareKeyInfo() so that in the case of invalid
upload id, prepareKeyInfo() throws the proper exception. Otherwise,
validateEncryptionKeyInfo() would throw an OMException with INTERNAL_ERROR code
that crashes OM.
--
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]