Skip to content

osdc/Objecter: assign op tid under the session lock - #71984

Merged
ronen-fr merged 1 commit into
ceph:mainfrom
ronen-fr:wip-rf-tid
Sep 28, 2026
Merged

ronen-fr merged 1 commit into
ceph:mainfrom
ronen-fr:wip-rf-tid

Conversation

@ronen-fr

Copy link
Copy Markdown
Contributor

osdc/Objecter: assign op tid under the session lock

... and in a single location only.

With rados_osd_op_timeout set, _op_submit_with_budget() allocated the
tid outside the session lock, letting a thread that drew a later tid
reach _send_op() first. tid order has to match the order ops are sent,
as _kick_requests() resends in tid order; this is caught by
cls/test_cls_2pc_queue.sh once osd_debug_op_order is enabled.

Record only a deadline at submit time, and register the timer event in
_maybe_arm_op_timeout() once the tid has been assigned under the
session lock. The deadline is absolute, so timeout semantics are
unchanged. The early allocation came from 0635b13, which needed a
tid before submit so C_CancelOp could be constructed complete; the
separate constraint that forced arming before _send_op() has been
compiled out since 18ff587.

Fixes: https://tracker.ceph.com/issues/80745
Assisted-by: Claude
Signed-off-by: Ronen Friedman [email protected]

NOTE: the 'qa/rados' commit is already part of a different PR (here as it is a check against the new PR)

@ronen-fr

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@JonBailey1993 JonBailey1993 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the second commit, as the first approved in #71861 already. LGTM, had a look through the SplitOp path and looks good too.

@adamemerson adamemerson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good to Me
Let's Get This Merged

@ronen-fr

Copy link
Copy Markdown
Contributor Author

Merging based on my Teuthology tests

... and in a single location only.

With rados_osd_op_timeout set, _op_submit_with_budget() allocated the
tid outside the session lock, letting a thread that drew a later tid
reach _send_op() first. tid order has to match the order ops are sent,
as _kick_requests() resends in tid order; this is caught by
cls/test_cls_2pc_queue.sh once osd_debug_op_order is enabled.

Record only a deadline at submit time, and register the timer event in
_maybe_arm_op_timeout() once the tid has been assigned under the
session lock. The deadline is absolute, so timeout semantics are
unchanged. The early allocation came from 0635b13, which needed a
tid before submit so C_CancelOp could be constructed complete; the
separate constraint that forced arming before _send_op() has been
compiled out since 18ff587.

Fixes: https://tracker.ceph.com/issues/80745
Assisted-by: Claude
Signed-off-by: Ronen Friedman <[email protected]>
@ronen-fr

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ronen-fr
ronen-fr merged commit d689637 into ceph:main Sep 28, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/36438049060

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.

3 participants