wyxxxcat opened a new pull request, #62973:
URL: https://github.com/apache/doris/pull/62973
### What problem does this PR solve?
S3 `DeleteObject` is idempotent and can return success even when the target
object does not exist. Because of this, explicit file deletion in cloud
recycler could silently ignore missing objects.
This change makes explicit object deletion verify object existence before
deleting by default, so missing files are surfaced as errors instead of being
treated as successful deletes.
### What changed?
- Added an object existence check before `S3ObjClient::delete_object` and
`AzureObjClient::delete_object`.
- Updated `S3Accessor::delete_file` to propagate `NOT_FOUND` instead of
treating it as success.
- Added `ObjClientOptions::check_exists_before_delete` so explicit batch
file deletes can request existence validation.
- Added cloud config `enable_delete_file_check_object_exists`, defaulting to
`true`, to allow disabling the extra `HEAD` request when needed.
- Kept recursive/prefix cleanup behavior idempotent by default to avoid
breaking retry and concurrent recycler cleanup flows.
- Added `DCHECK` when the pre-delete `HEAD` check fails.
- Added unit coverage for the S3 delete existence-check config behavior.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
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]