Skip to content

HDDS-16797. S3G: Avoid calling getS3Volume in ABORT_MULTIPART_UPLOAD - #11449

Open
F64116045 wants to merge 6 commits into
apache:masterfrom
F64116045:HDDS-16797
Open

F64116045 wants to merge 6 commits into
apache:masterfrom
F64116045:HDDS-16797

Conversation

@F64116045

@F64116045 F64116045 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

S3G currently makes two OM RPCs to abort a multipart upload: GetS3VolumeContext to find the volume, followed by AbortMultiPartUpload to cancel the upload.

With assumeS3Context=true, S3G can send the abort request directly. OM can resolve the volume while handling that request, reducing the RPCs from 2 to 1.

What is the link to the Apache JIRA?

https://issues.apache.org/jira/browse/HDDS-16797

How was this patch tested?

CI: https://github.com/F64116045/ozone/actions/runs/38330665974

Generated-by: Codex (GPT-6)

# Conflicts:
#	hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneManagerVersion.java
@github-actions github-actions Bot added om client s3 S3 Gateway labels Oct 8, 2026
# Conflicts:
#	hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneManagerVersion.java
#	hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/rpc/TestRpcClient.java
@F64116045
F64116045 marked this pull request as ready for review October 10, 2026 13:44

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! @F64116045 Looks good overall. I left a few inline comments.

+ "client-side InfoBucket layout check for getFileChecksum"),
ZDU(100, "OzoneManager version that supports zero downtime upgrade"),

S3_MULTIPART_UPLOAD_ABORT_CONTEXT(101,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up, #11458 also adds 101, so whichever merges second will need to bump. cc @rich7420

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads-up. I’ll bump the OM version in #11458 if this merges first.


String keyName = "key";
String uploadID = bucket.initiateMultipartUpload(keyName).getUploadID();
store.getClientProxy().abortS3MultipartUpload(BUCKET_NAME, keyName, uploadID);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also cover a link bucket in the tenant volume? The link may point to another volume with a different layout.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added it!
Also covered different layouts between the link and target bucket.


/** Abort a multipart upload, optionally resolving its S3 volume on OM. */
default void abortMultipartUpload(OmKeyArgs omKeyArgs, boolean assumeS3Context) throws IOException {
throw new UnsupportedOperationException("Write requests are handled through OMClientRequest");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we reuse the message from the neighboring methods for consistency?

Suggested change
throw new UnsupportedOperationException("Write requests are handled through OMClientRequest");
throw new UnsupportedOperationException("OzoneManager does not require " +
"this to be implemented, as write requests use a new approach.");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, updated. thanks

@Russole
Russole self-requested a review October 11, 2026 13:49
@F64116045
F64116045 requested a review from chihsuan October 11, 2026 15:32
@F64116045

Copy link
Copy Markdown
Contributor Author

thanks @chihsuan for the review, I've addressed the comment!

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @F64116045, I just noticed #11479 puts assumeS3Context on OMRequest, while this PR adds it to MultipartUploadAbortRequest. Could we align on one place?

I'd lean toward the OMRequest approach in #11479, so writes can clear it once before Ratis.

@chungen0126 would that work as the convention for the remaining subtasks?

"this to be implemented, as write requests use a new approach.");
}

/** Abort a multipart upload, optionally resolving its S3 volume on OM. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could we mention that OM replaces the volume in omKeyArgs when assumeS3Context is true?

Suggested change
/** Abort a multipart upload, optionally resolving its S3 volume on OM. */
/**
* Abort a multipart upload.
* @param assumeS3Context if true, OM resolves the S3 volume and ignores the volume in omKeyArgs.
*/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, thanks.

@F64116045

Copy link
Copy Markdown
Contributor Author

I'd lean toward the OMRequest approach in #11479, so writes can clear it once before Ratis.

Thanks, agree. moved assumeS3Context to OMRequest to match that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants