Repository navigation
osd/PrimaryLogPG: take an op's PG log version after its ops have run - #73326
Merged
MattyWilliams22 merged 2 commits intoNov 23, 2026
Merged
Conversation
execute_ctx() took the op's PG log version (projected_last_update + 1) before running the ops. On a pool with EC optimizations an op with a CALL runs in a coroutine, and a cls read in it yields until the EC read completes. While it waits the PG lock is free, and work that does not go through do_op() can take versions: the snap trimmer, watch timeouts, and ops whose async reads complete. The CALL then submits a version that is already used, and the primary aborts in issue_repop(), on at_version >= projected_last_update or on PGLog's e.version > head. Take the version in prepare_transaction() after do_osd_ops() returns, where the op can no longer yield. Fixes: https://tracker.ceph.com/issues/82471 Assisted-by: Claude Code Signed-off-by: Matty Williams <[email protected]>
On a FastEC pool, a write with a cmpext waits for its EC read while an object map update, a CALL, takes its version and yields on its own read. The write's read completes first, so the write takes a version too. A primary that then reuses a version aborts, and the ops are resent to the next primary and succeed, so the test also checks that no OSD went down. Fixes: https://tracker.ceph.com/issues/82471 Assisted-by: Claude Code Signed-off-by: Matty Williams <[email protected]>
MattyWilliams22
force-pushed
the
wip-ec-coroutine-version-race
branch
from
November 2, 2026 12:09
ee09e07 to
e227c19
Compare
Contributor
|
I've reviewed this code which was written by Claude. I believe that the code is valid, solves and tests a real problem, so I have signed it off in my name. |
Contributor
|
jenkins test make check |
MattyWilliams22
removed their request for review
November 3, 2026 10:13
Contributor
|
jenkins test make check |
bill-scales
approved these changes
Nov 5, 2026
bill-scales
left a comment
Contributor
There was a problem hiding this comment.
LGTM - Only affects EC pools being used with I/O requests that include read class ops. This has only been supported since umbrella and requires an EC pool to be used for metadata where previously the only choice was to use a Replica pool.
Contributor
|
This PR has been added to wip-bharath10-testing-20261109.054620-main. |
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.
On a pool with EC optimizations, an op with a CALL runs in a coroutine, and a cls read in it yields until the EC read completes.
execute_ctx()took the op's PG log version before running the ops. While the CALL waits, the PG lock is free, and work that does not go throughdo_op()can take versions: the snap trimmer, watch timeouts, and ops whose async reads complete. The CALL then submits a version that is already used, and the primary aborts inissue_repop(), onat_version >= projected_last_updateor on PGLog'se.version > head.The version is now taken in
prepare_transaction()afterdo_osd_ops()returns, where the op can no longer yield.The new
TestClsRbd.object_map_update_while_a_write_readsreproduces it: on main its FastEC case aborts the primary atPGLog.h:675.Fixes: https://tracker.ceph.com/issues/82471
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.
🤖 Raised by Claude Code.