smengcl commented on code in PR #5694:
URL: https://github.com/apache/ozone/pull/5694#discussion_r1488729815
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java:
##########
@@ -154,9 +154,12 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
.map(info -> info.getProtobuf(getOmRequest().getVersion()))
.collect(Collectors.toList()));
+ KeyArgs resolvedArgs = resolveBucketAndCheckKeyAcls(newKeyArgs.build(),
+ ozoneManager, IAccessAuthorizer.ACLType.CREATE);
+
generateRequiredEncryptionInfo(keyArgs, newKeyArgs, ozoneManager);
CreateFileRequest.Builder newCreateFileRequest =
- createFileRequest.toBuilder().setKeyArgs(newKeyArgs)
+ createFileRequest.toBuilder().setKeyArgs(resolvedArgs)
Review Comment:
Turns out this causes a regression where encrypted buckets won't correctly
have file encryption info in keyargs set. Because encryption info is generated
in `generateRequiredEncryptionInfo` above and put into `newKeyArgs`.
Credit to @jojochuang for locating this bug.
--
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]