Skip to content

cls/rgw: a skipped or canceled completion keeps the entry's version - #72097

Merged
anrao19 merged 3 commits into
ceph:mainfrom
mmgaggle:wip-rgw-cls-complete-keeps-ver
Oct 16, 2026
Merged

anrao19 merged 3 commits into
ceph:mainfrom
mmgaggle:wip-rgw-cls-complete-keeps-ver

Conversation

@mmgaggle

@mmgaggle mmgaggle commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

rgw_bucket_complete_op sets entry.ver = op.ver before it acts on the op. A cancel, or an op skipped because its epoch is not newer than the entry's, then lowers the entry's version; a cancel sets it to its own {-1, 0}. A later completion from an older epoch passes the epoch check and overwrites the newer entry, and with no pending op left, no listing repairs it: ListObjects keeps listing an object the head no longer holds, or a key that answers 404.

Set the version only when the op is applied. 8b27472bbd8a moved the assignment above the cancel branch while reworking cancellation to clean up remove_objs.

Three new ceph_test_cls_rgw cases complete ops out of epoch order; they fail without the fix. With it, ceph_test_cls_rgw and ceph_test_cls_rgw_stats pass on a vstart cluster (replicated pools).

Fixes: https://tracker.ceph.com/issues/80894

Versioned buckets

Versioned writes still complete through rgw_bucket_complete_op, on the version's own instance entry, and a null version's ops are redirected from the key's version marker to the null instance entry. The change reaches both. A new cls_rgw test, index_stale_complete_keeps_newest_null_version, checks the null instance entry the way the existing test checks a plain entry.

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)

rgw_bucket_complete_op sets entry.ver = op.ver before it acts on the op.
A cancel, or an op skipped because its epoch is not newer than the
entry's, then lowers the entry's version; a cancel sets it to its own
{-1, 0}. A completion from an older epoch that arrives later passes the
epoch check and overwrites the newer entry, and with no pending op left,
no listing repairs it. Three PutObjects whose completions arrive out of
order leave the index listing an object the head no longer holds.

Set the version only when the op is applied. 8b27472 moved the
assignment above the cancel branch while reworking cancellation to
clean up remove_objs; before it, a cancel returned first.

Fixes: https://tracker.ceph.com/issues/80894
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
rgw_bucket_complete_op sets the entry's version from the op even when it
skips the op as stale or applies a cancel. A later completion from an
older epoch then passes the epoch check and overwrites the entry. Three
tests complete ops out of epoch order and expect the entry, and the
header's stats, to reflect the newest write. They fail on main.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
@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
In a bucket whose versioning is suspended, the null version of a key
with an olh lives in the null instance entry behind the key's version
marker, where complete_op redirects its ops. Check that a stale
completion there keeps the newest write too, as the test before it
checks for a plain entry.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
@adamemerson

Copy link
Copy Markdown
Contributor

jenkins test make check

@adamemerson

Copy link
Copy Markdown
Contributor

@anrao19

anrao19 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-10-14-04:11.

@anrao19

anrao19 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-10-14-04:11.

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

@anrao19
anrao19 merged commit 0a7bfbf into ceph:main Oct 16, 2026
19 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