anuragp010 commented on code in PR #11626:
URL: https://github.com/apache/ozone/pull/11626#discussion_r4496117532
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3InitiateMultipartUploadRequest.java:
##########
@@ -98,8 +100,21 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
generateRequiredEncryptionInfo(keyArgs, newKeyArgs, ozoneManager);
- KeyArgs resolvedArgs = resolveBucketAndCheckKeyAcls(newKeyArgs.build(),
- ozoneManager, ACLType.CREATE);
+ final KeyArgs.Builder resolvedArgsBuilder =
resolveBucketAndCheckKeyAcls(newKeyArgs.build(),
+ ozoneManager, ACLType.CREATE).toBuilder();
+
+ // Stamp the policy only once finalized: an OM without storage policy
support ignores the field, so stamping it
+ // earlier would make old and new OMs apply this request differently.
Clearing also drops a client-sent value.
+ if
(ozoneManager.getVersionManager().isAllowed(OMLayoutFeature.STORAGE_POLICY_SUPPORT))
{
Review Comment:
Thanks @rakeshadr . I have created
[HDDS-17727](https://issues.apache.org/jira/browse/HDDS-17727) as a follow up
to handle this.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java:
##########
@@ -134,6 +134,9 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
repConfig, new ExcludeList(), requestedSize,
keyArgs.getSortDatanodes(), userInfo, ozoneManager,
storagePolicy, getAllowFallbackStoragePolicy(bucketInfo));
+ // TODO: stamp the policy only if STORAGE_POLICY_SUPPORT is finalized (see
Review Comment:
Done.
--
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]