-
Notifications
You must be signed in to change notification settings - Fork 6k
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
common: mark events of TrackedOp outside its constructor #19828
common: mark events of TrackedOp outside its constructor #19828
Conversation
Hmm, do we know why tracking_start is invoked where it is? That function isn’t familiar to me but it smells like performance. |
@gregsfortytwo Hi, thanks for the review:-) |
@gregsfortytwo |
Yeah, see ad13e05 which introduced that function. However, that specific part of the code hasn't changed in a long time (2016!) I think something else must be going on. |
bdea1ab
to
040f9c2
Compare
02d55e2
to
9911d78
Compare
can we put it in create_request<>() instead? |
Yes, I like that — all Messages are going to have those fields; we should unify setting the values so it doesn't get lost in future invocations. |
9911d78
to
1bf66de
Compare
@gregsfortytwo @liewegas |
1bf66de
to
0681e17
Compare
src/msg/Message.h
Outdated
virtual const utime_t& get_recv_complete_stamp() const =0; | ||
virtual const utime_t& get_dispatch_stamp() const =0; | ||
virtual ~BasicParams(){}; | ||
}; |
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.
With the templated function I don't think we actually need a shared Params class like this — why did you create it?
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.
@gregsfortytwo
I intended to use some template argument constraints, c++ concepts for example, to require all params classes to be derived from BasicParams so that they will all have to implement the get_XXX_stamp() methods, which I think is necessary since we will call those methods in create_request.
However, I've just found that c++ concepts is still a work in progress as part of the Concepts Technical Specification that were included in the working draft of C++20, so I guess I should remove BasicParams class. Is this right? If it is, I will remove it.
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.
Yeah, I think so. We'll still fail to build if you try and use something that doesn't have those functions. :)
jenkins retest this please |
Avoid marking events when TrackedOp::tracking_start() isn't invoked yet. Fixes: http://tracker.ceph.com/issues/22608 Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
0681e17
to
a74e554
Compare
@gregsfortytwo @liewegas I've removed the BasicParams class, please review this pr when you are spare:-) |
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.
The real changes look good here but I think you left in a reference-to-pointer conversion by mistake?
MDRequestImpl(const Params& params, OpTracker *tracker) : | ||
MutationImpl(tracker, params.initiated, | ||
params.reqid, params.attempt, params.slave_to), | ||
MDRequestImpl(const Params* params, OpTracker *tracker) : |
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.
Why are you changing this to a const pointer? It was previously a const reference because that's our style guide and makes very clear there won't be any changes or shallow copies of the parameter.
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.
@gregsfortytwo
Hi, thanks for the review:-)
I changed this to a pointer because, in create_request, I can only call the get_XXX_stamp() method through either "->" or "." and, in OSD and monitor, the parameter of the create_request method is a pointer, so I choose to change the "params" of MDRequestImpl to a pointer so that I can call the get_XXX_stamp() method uniformly in create_request.
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.
Oh of course, that makes sense,
Would like to run through QA and merge once those extra changes to MutationImpl are gone! :) |
@yuriw I can't open your card. |
@xxhdx1985126 Maybe you are not a member of https://trello.com/cephstorage yet? |
@smithfarm Yes. |
@xxhdx1985126 Did you try asking on ceph-devel mailing list? |
Avoid marking events when TrackedOp::tracking_start() isn't invoked yet.
Fixes: http://tracker.ceph.com/issues/22608
Signed-off-by: Xuehan Xu xuxuehan@360.cn