Skip to content

HDDS-13919. S3 Conditional Writes (PutObject) [3/3] - Remove expectedETag from OmKeyInfo#10182

Merged
peterxcli merged 3 commits intoapache:masterfrom
peterxcli:chore/remove-unused-expectedEtag-from-omkey-info
May 4, 2026
Merged

HDDS-13919. S3 Conditional Writes (PutObject) [3/3] - Remove expectedETag from OmKeyInfo#10182
peterxcli merged 3 commits intoapache:masterfrom
peterxcli:chore/remove-unused-expectedEtag-from-omkey-info

Conversation

@peterxcli
Copy link
Copy Markdown
Member

@peterxcli peterxcli commented May 4, 2026

What changes were proposed in this pull request?

Found this while i was reviewing #10181

If-Match is handled on create using only KeyArgs: validateAndRewriteIfMatchAsExpectedGeneration checks the ETag against the DB key, then folds that into expectedDataGeneration and clears KeyArgs.expectedETag before prepareFileInfo. So OmKeyInfo never needed to carry the ETag; commit validation uses expectedDataGeneration only (see validateAtomicRewrite in OMKeyCommitRequest). The tests were already asserting openKeyInfo.getExpectedETag() == null.

What is the link to the Apache JIRA

How was this patch tested?

existing tests

Signed-off-by: peterxcli <peterxcli@gmail.com>
@peterxcli
Copy link
Copy Markdown
Member Author

cc @YutaLin

Copy link
Copy Markdown
Contributor

@ivandika3 ivandika3 left a comment

Choose a reason for hiding this comment

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

Thanks @peterxcli , LGTM +1.

@peterxcli peterxcli merged commit 8507816 into apache:master May 4, 2026
47 checks passed
@peterxcli
Copy link
Copy Markdown
Member Author

Thanks @ivandika3 for the review!

@peterxcli peterxcli deleted the chore/remove-unused-expectedEtag-from-omkey-info branch May 4, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants