Repository navigation
umbrella: rgw: reread the olh head after replaying its log - #72819
Conversation
When concurrent olh log replays race, the canceled replay can cause a read to return 404 even though the object still exists. Reset the cached olh state in place so get_obj_state() rereads the olh head and replays the log again, and return 503 after five failed attempts. The replay that won has usually applied the log by then. The state is reset rather than invalidated because callers hold pointers to it. A head with no version ever linked still returns ENOENT. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit e93737c)
follow_olh() decodes the current version from the cached OLH_INFO, which apply_olh_log() never updated, so a read that replayed the olh log could still follow the version that was current before the replay. Apply the same xattr changes to the cached olh state once the head write succeeds, so we follow the new current version without another read. Have follow_olh() also drop the unexpired pending entries it found, which the log may not cover yet, so a later follow in the same request can't pick up a newer link and switch versions. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit 24e1fb9)
After clear_olh() removes the olh head, the cached state still said it existed. A delete that replayed the olh log would then fail to write its delete marker, and a read that replayed the removal of the last version would still follow it. Mark the cached head as removed once clear_olh() removes it, and have follow_olh() return ENOENT when its replay removed the head. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit 91410bd)
Versioned writes and delete markers look up the current version only to check preconditions against it. Since a canceled olh log replay now ends in 503 instead of ENOENT, a write without preconditions would fail on a lookup it never uses, where it used to go through. The lookup also costs extra head reads and can replay the olh log. DeleteObjects has the same problem with its state load: it fails a key on any error but ENOENT, while DeleteObject only fails when it needs the state for object lock. Only look up the current version when the request has a precondition, and have DeleteObjects fail a key on a state load error only when it checks object lock, as DeleteObject does. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit 80260db)
Raise the olh version so olh log replay fails, then delete the current object version, delete the object with DeleteObjects, and write a new one. Check that the deletes and the write succeed and reads return 503 while replay keeps failing, then restore the olh version and check that reads return the new version. Also check that a delete writes its delete marker after the olh log replay removes the olh head. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit f28cd14) Conflicts: qa/workunits/rgw/test_rgw_versioning.py - umbrella lacks the 'bucket radoslist names the olh object of a key starting with an underscore' testcase that precedes the new tests on main; added the new testcases after the concurrent delete testcase instead and did not backport the radoslist testcase
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Commit Parity Visualizer
| BACKPORT PR #72819 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| 79e4331 rgw: retry canceled olh log replay | PR #71924 | e93737c rgw: retry canceled olh log replay |
| ec6b092 rgw: apply_olh_log() updates cached olh attrs | 24e1fb9 rgw: apply_olh_log() updates cached olh attrs | |
| bdb328a rgw: clear_olh() updates cached olh state | 91410bd rgw: clear_olh() updates cached olh state | |
| 866ad54 rgw: skip current version lookup without preconditions | 80260db rgw: skip current version lookup without preconditions | |
| dad2a70 qa/rgw: test reads when olh log replay is canceled | f28cd14 qa/rgw: test reads when olh log replay is canceled |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport dad2a70 (cherry-pick of f28cd14)
Affected File(s)
qa/workunits/rgw/test_rgw_versioning.py
Range Diff
Click to expand
--- Original (f28cd144)
+++ Backport (dad2a70d)
@@ -10,3 +10,11 @@
replay removes the olh head.
Signed-off-by: Matthew N. Heler <[email protected]>
+(cherry picked from commit f28cd1442d6d06245995792e87a9161a97056089)
+
+Conflicts:
+ qa/workunits/rgw/test_rgw_versioning.py
+- umbrella lacks the 'bucket radoslist names the olh object of a key
+ starting with an underscore' testcase that precedes the new tests on
+ main; added the new testcases after the concurrent delete testcase
+ instead and did not backport the radoslist testcase
================================================================================
RANGE DIFF
================================================================================
1: f28cd1442d6 ! 1: dad2a70d85b qa/rgw: test reads when olh log replay is canceled
@@ Commit message
replay removes the olh head.
Signed-off-by: Matthew N. Heler <[email protected]>
+ (cherry picked from commit f28cd1442d6d06245995792e87a9161a97056089)
+
+ Conflicts:
+ qa/workunits/rgw/test_rgw_versioning.py
+ - umbrella lacks the 'bucket radoslist names the olh object of a key
+ starting with an underscore' testcase that precedes the new tests on
+ main; added the new testcases after the concurrent delete testcase
+ instead and did not backport the radoslist testcase
## qa/workunits/rgw/test_rgw_versioning.py ##
@@ qa/workunits/rgw/test_rgw_versioning.py: def main():
- stored = sorted(line.split('\t')[0] for line in out.decode().splitlines() if key in line)
- assert listed == stored, f'radoslist {listed} does not match rados objects {stored}'
+ assert num_leftover_olh_entries == 0, \
+ 'Found leftover olh entries after concurrent deletes'
+ # TESTCASE 'verify that reads recover after a canceled olh replay'
+ log.debug('TEST: verify that reads recover after a canceled olh replay\n')How to proceed:
- Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git
Conflicts:block intact) and include an explanation for changes. - Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
- Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting
/audit override.
Be familiar with the rules and guidelines for writing backports.
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
|
jenkins test windows |
|
This PR has been added to wip-anrao19-testing-2026-11-11-0646-umbrella. |
pr testing completed and approved by @ivancich more details on :https://tracker.ceph.com/issues/83032 |
backport tracker: https://tracker.ceph.com/issues/81867
backport of #71924
parent tracker: https://tracker.ceph.com/issues/80653
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh