You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "peterxcli (via GitHub)" <gi...@apache.org> on 2026/06/14 05:45:11 UTC
[PR] Add If-Match support for object deletes [ozone]
peterxcli opened a new pull request, #10511:
URL: https://github.com/apache/ozone/pull/10511
## What changes were proposed in this pull request?
Amazon S3 supports conditional deletes on Sep 16, 2025.
* With conditional deletes, you can protect your application from accidental deletions of objects.
* You can use the If-Match header with the * value to check if the object exists before attempting to delete it.
Require updating both code and design doc of conditional request
* https://aws.amazon.com/about-aws/whats-new/2025/09/amazon-s3-conditional-deletes-s3-general-purpose-buckets/
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-deletes.html
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14907
## How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests, workflow run on the fork git repo.)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this.)
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 merged PR #10511:
URL: https://github.com/apache/ozone/pull/10511
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on code in PR #10511:
URL: https://github.com/apache/ozone/pull/10511#discussion_r3481610813
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3ConditionalRequest.java:
##########
@@ -288,4 +299,20 @@ String getExpectedETag() {
return parseETag(ifMatch);
}
}
+
+ static final class DeleteCondition {
+ private final String ifMatch;
+
+ private DeleteCondition(String ifMatch) {
+ this.ifMatch = ifMatch;
+ }
Review Comment:
Any issue if we store the parsed ETag immediately?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "peterxcli (via GitHub)" <gi...@apache.org>.
peterxcli commented on PR #10511:
URL: https://github.com/apache/ozone/pull/10511#issuecomment-4701430348
.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "peterxcli (via GitHub)" <gi...@apache.org>.
peterxcli commented on code in PR #10511:
URL: https://github.com/apache/ozone/pull/10511#discussion_r3483970389
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3ConditionalRequest.java:
##########
@@ -288,4 +299,20 @@ String getExpectedETag() {
return parseETag(ifMatch);
}
}
+
+ static final class DeleteCondition {
+ private final String ifMatch;
+
+ private DeleteCondition(String ifMatch) {
+ this.ifMatch = ifMatch;
+ }
Review Comment:
`WriteCondition` follows the same pattern
https://github.com/apache/ozone/blob/0db05b0058f8dc298179d9d75c0b87ab009ef165/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3ConditionalRequest.java#L281-L301
I agree it’d be cleaner to store the parsed eTag directly in the class instead of re-parsing on every getter call. I’ll address both `DeleteCondition` and `WriteCondition` together in a follow-up.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on PR #10511:
URL: https://github.com/apache/ozone/pull/10511#issuecomment-4814507251
Thanks @peterxcli for the patch.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "peterxcli (via GitHub)" <gi...@apache.org>.
peterxcli commented on PR #10511:
URL: https://github.com/apache/ozone/pull/10511#issuecomment-4815473367
@ivandika3 Thanks for the review and merging!
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14907. Conditional Delete (DeleteObject) [ozone]
Posted by "peterxcli (via GitHub)" <gi...@apache.org>.
peterxcli commented on PR #10511:
URL: https://github.com/apache/ozone/pull/10511#issuecomment-4728608354
cc @YutaLin @henrybear327
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org