New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osdc/Objecter: no need null pointer check for op->session anymore #25230
Conversation
@liewegas since
but i don't know how to fix it properly :( |
retest this please |
@@ -1328,15 +1328,6 @@ void Objecter::handle_osd_map(MOSDMap *m) | |||
for (list<LingerOp*>::iterator p = need_resend_linger.begin(); | |||
p != need_resend_linger.end(); ++p) { | |||
LingerOp *op = *p; | |||
if (!op->session) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So _recalc_linger_op_target()
invokes _session_linger_op_assign()
, but only if _get_session()
had a different answer than previously — and one of the allowed answers is "homeless". It looks to me like a newly-homeless op can still be put on the need_resend_linger
list?
Although since this code doesn't handle that either, maybe it's not the case. Can we at least add an assert(session);
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_recalc_linger_op_target
only gets called by Objecter::_scan_requests
which assures the checked linger op always has a OSDSession
associated with it, and in _recalc_linger_op_target
if _get_session
has a different answer then it will assign a different (non-null) session.
It looks to me like a newly-homeless op can still be put on the
need_resend_linger
list?
yes, it's perfectly valid, so in Objecter::handle_osd_map
before resending the linger op we have a homeless check.
Can we at least add an
assert(session);?
sure :)
@runsisi can you open a tracker ticket for this? |
@liewegas this pr is just a cleanup, i do not have the pemission to change the pr's label from the related bugfix is in this pr: #25243, please review, thanks~ |
9a5651b refactored the resend logic for linger op, op->session should be assigned by _recalc_linger_op_target if resend is needed Signed-off-by: runsisi <luo.runbing@zte.com.cn>
1c0f0e2
to
6a47e01
Compare
@gregsfortytwo is this change good to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Greg Farnum gfarnum@redhat.com
Oh but the commit should be amended to include before we merge! :) |
@runsisi @gregsfortytwo i think it's #25243 which addresses http://tracker.ceph.com/issues/37398, right? |
@tchaikov yeah, this is pr is just a cleanup :) and i will update the other one later~ |
@gregsfortytwo good to merge? |
Yeah sorry for my confusion there. |
9a5651b refactored the resend logic for linger op, op->session should be assigned by _recalc_linger_op_target if resend is needed
Signed-off-by: runsisi luo.runbing@zte.com.cn