Repository navigation
crimson/osd: replace RecoveryCloneLockManager with ObjectContextLoader::Manager - #70085
Merged
Merged
Conversation
4 of 14 tasks
tchaikov
force-pushed
the
wip-recovery-clone-lock-raii
branch
from
July 9, 2026 15:12
31f2fac to
4559e15
Compare
…r::Manager RecoveryCloneLockManager reimplemented what ObjectContextLoader::Manager already provides: RAII release, move, obc_set_accessing bookkeeping. It only needed a non-blocking read acquire, so recovery never blocks on a clone snap trim is writing. Add state_t::try_lock_for_read() and a loader factory, try_lock_cached_obc_for_read(), returning a Manager holding the lock, or nullopt. commit_clone_overlap_plan() and set_recovery_info() now return their Managers instead of accumulating them through reference parameters, so acquiring the locks initializes the object that owns them and no caller has to remember to clear a vector before reusing it. recalc_subsets() takes the new locks before the assignment releases the old ones, so no writer can slip in between. Releasing from a destructor is safe here but not in classic: classic's ObcLockManager must release explicitly because unlocking requeues blocked ops, which needs PG context a destructor lacks. A crimson read unlock only decrements the reader count and wakes waiters. The explicit releases that remain are documented in place: completion boundaries release promptly because the recovering entry outlives them; error and interval-change paths release because erase()/clear() only drops the map's reference while waiters may keep the infos alive; stop() releases because the PG destroys obc_loader before recovery_backend. Remove RecoveryCloneLockManager and the ObjectContext try_get_read_lock/put_read_lock helpers it needed. Signed-off-by: Kefu Chai <[email protected]>
tchaikov
force-pushed
the
wip-recovery-clone-lock-raii
branch
from
July 15, 2026 02:40
4559e15 to
df5480b
Compare
Contributor
Author
|
@knrt10 could you please take a look ? |
Contributor
PR=wip-perezjos-crimson-only-16-07-2026-PR70085
$ teuthology-suite -s crimson-rados -p 101 --force-priority -c $PR -f debug --filter-out rgw --suite-branch main --suite-repo https://github.com/ceph/ceph.git
2026-07-17 09:33:03,815.815 INFO:teuthology.suite.run:Test results viewable at
|
Contributor
|
Seems there are plenty of infra: @perezjosibm, can we please retest this? |
Contributor
PR=wip-perezjos-crimson-only-03-08-2026-PR70085
$ teuthology-suite -s crimson-rados -p 101 --force-priority -c $PR -f debug --filter-out rgw --suite-branch main --suite-repo https://github.com/ceph/ceph.git
2026-08-04 06:54:55,189.189 INFO:teuthology.suite.run:Test results viewable at
Attempting a re-run: $ teuthology-suite --rerun jjperez-2026-08-04_06:49:03-crimson-rados-wip-perezjos-crimson-only-03-08-2026-PR70085-distro-debug-trial -m trial -p 101 --force-priority -c $PR -f debug --suite-branch main --suite-repo https://github.com/ceph/ceph.git
026-08-12 13:52:04,921.921 INFO:teuthology.suite.run:Scheduled 50 jobs in total.
2026-08-12 13:52:06,727.727 INFO:teuthology.suite.run:Test results viewable at
|
Contributor
|
Tried rerunning as the filtered tests above had only a single snapshot test included. Had issues around flavor, moving back to needs-qa, will try to include this in my next run. |
Contributor
|
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.
RecoveryCloneLockManagerreimplemented whatObjectContextLoader::Manageralready provides: RAII release, move,obc_set_accessingbookkeeping. It only needed a non-blocking read acquire, so recovery never blocks on a clone snap trim is writing. Addstate_t::try_lock_for_read()and a loader factory,try_lock_cached_obc_for_read(), returning aManagerholding the lock, ornullopt.commit_clone_overlap_plan()andset_recovery_info()now return their Managers instead of accumulating them through reference parameters, so acquiring the locks initializes the object that owns them and no caller has to remember to clear a vector before reusing it.recalc_subsets()takes the new locks before the assignment releases the old ones, so no writer can slip in between.Releasing from a destructor is safe here but not in classic: classic's
ObcLockManagermust release explicitly because unlocking requeues blocked ops, which needs PG context a destructor lacks. A crimson read unlock only decrements the reader count and wakes waiters.The explicit releases that remain are documented in place: completion boundaries release promptly because the recovering entry outlives them; error and interval-change paths release because
erase()/clear()only drops the map's reference while waiters may keep the infos alive; stop() releases because the PG destroysobc_loaderbeforerecovery_backend.Remove
RecoveryCloneLockManagerand theObjectContexttry_get_read_lock/put_read_lockhelpers it needed.Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.