Repository navigation
cls/rgw: a skipped or canceled completion keeps the entry's version - #72097
Merged
Merged
Conversation
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]>
cbodley
approved these changes
Sep 28, 2026
4 of 14 tasks
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]>
Contributor
|
jenkins test make check |
Contributor
|
This commit has been added to https://tracker.ceph.com/issues/81363 |
Contributor
|
This PR has been added to main integration testing by anuchaithra started 2026-10-14-04:11. |
Contributor
pr testing completed and approved by @ivancich , more details in : https://tracker.ceph.com/issues/81741 |
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.
rgw_bucket_complete_opsetsentry.ver = op.verbefore 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.
8b27472bbd8amoved the assignment above the cancel branch while reworking cancellation to clean upremove_objs.Three new
ceph_test_cls_rgwcases complete ops out of epoch order; they fail without the fix. With it,ceph_test_cls_rgwandceph_test_cls_rgw_statspass 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