Skip to content

rgw/lc: take the completion lock before aborting an expired upload - #72099

Merged
anrao19 merged 1 commit into
ceph:mainfrom
mmgaggle:wip-rgw-lc-abort-mp-lock
Oct 13, 2026
Merged

anrao19 merged 1 commit into
ceph:mainfrom
mmgaggle:wip-rgw-lc-abort-mp-lock

Conversation

@mmgaggle

@mmgaggle mmgaggle commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

handle_multipart_expiration calls RadosMultipartUpload::abort without the lock that CompleteMultipartUpload holds; bae9ed83edf 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 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_versioned and _suspended pass.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

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]>
@github-actions github-actions Bot added the rgw label Sep 26, 2026
@mmgaggle
mmgaggle marked this pull request as ready for review September 26, 2026 08:00
@mmgaggle
mmgaggle requested a review from a team as a code owner September 26, 2026 08:00
@anrao19

anrao19 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-30-07:27.

@adamemerson adamemerson added wip-aemerson2-testing More testing by adamemerson wip-aemerson-testing Testing by adamemerson and removed wip-aemerson2-testing More testing by adamemerson labels Oct 2, 2026
@adamemerson

Copy link
Copy Markdown
Contributor

@anrao19

anrao19 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-30-07:27.

pr testing completed and approved by @ivancich. More details in : https://tracker.ceph.com/issues/81163.
@mmgaggle , if no further testing is needed then this can be merged

@anrao19
anrao19 merged commit 6e80edd into ceph:main Oct 13, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants