Repository navigation
rgw/lc: take the completion lock before aborting an expired upload - #72099
Merged
Merged
Conversation
handle_multipart_expiration calls RadosMultipartUpload::abort without the lock that CompleteMultipartUpload holds; bae9ed8 gave that lock to AbortMultipartUpload only. An upload past its AbortIncompleteMultipartUpload age that is completed while lifecycle processes the bucket can have its parts sent to GC after the completion wrote a head that names them. The abort's cls_version check does not catch it, because a completion does not bump the meta object's version. Take the lock as AbortMultipartUpload does, and leave the upload for a later pass if a completion holds it. Fixes: https://tracker.ceph.com/issues/80895 Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Kyle Bader <[email protected]>
cbodley
approved these changes
Sep 29, 2026
Contributor
|
This PR has been added to main integration testing by anuchaithra started 2026-09-30-07:27. |
Contributor
|
This commit has been added to https://tracker.ceph.com/issues/81363 |
Contributor
pr testing completed and approved by @ivancich. More details in : https://tracker.ceph.com/issues/81163. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
handle_multipart_expirationcallsRadosMultipartUpload::abortwithout the lock that CompleteMultipartUpload holds;bae9ed83edfgave that lock to AbortMultipartUpload only. An upload past its AbortIncompleteMultipartUpload age that is completed while lifecycle processes the bucket can have its parts sent to GC after the completion wrote a head that names them. The abort'scls_versioncheck does not catch it, because a completion does not bump the meta object's version.Take the lock as AbortMultipartUpload does, and leave a locked upload for the next pass.
The s3-test
test_lifecycle_abort_racing_complete_multipart(https://github.com/mmgaggle/s3-tests/tree/wip-rgw-overwrite-races), which holds a completion after its head write with the injection points in #72096, fails on main (GET returns NoSuchKey once GC has run) and passes with this change on a vstart cluster.Fixes: https://tracker.ceph.com/issues/80895
Versioned buckets
Lifecycle aborts uploads through the same path for every bucket kind, and it locks the same meta object that CompleteMultipartUpload locks; the meta object is never versioned. No change is needed. s3-tests
test_lifecycle_abort_racing_complete_multipart_versionedand_suspendedpass.Checklist