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
mon: optracker's initiated_at timestamp should not be NULL #12826
Conversation
206b869
to
2aab6bf
Compare
@tchaikov pls review, thanks! |
@@ -86,7 +86,8 @@ struct MonOpRequest : public TrackedOp { | |||
op_type_t op_type; | |||
|
|||
MonOpRequest(Message *req, OpTracker *tracker) : | |||
TrackedOp(tracker, req->get_recv_stamp()), | |||
TrackedOp(tracker, | |||
req->get_recv_stamp() ? req->get_recv_stamp() : ceph_clock_now(g_ceph_context)), |
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.
ceph_clock_now now deprecates argument. plz don't pass g_ceph_context
2aab6bf
to
b6076e3
Compare
@@ -86,7 +86,8 @@ struct MonOpRequest : public TrackedOp { | |||
op_type_t op_type; | |||
|
|||
MonOpRequest(Message *req, OpTracker *tracker) : | |||
TrackedOp(tracker, req->get_recv_stamp()), | |||
TrackedOp(tracker, | |||
req->get_recv_stamp() ? req->get_recv_stamp() : ceph_clock_now()), |
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.
you are actually using the operator double
as operator bool
. could you instead use is_zero()
instead? and wrap the line at 80 chars.
so using ceph_clock_now() instead to make optracker happy Signed-off-by: Mingxin Liu <mingxin@xsky.com>
b6076e3
to
ecb967a
Compare
@tchaikov updated |
mon may track a self-initiated message, recv_stamp remains unset
so using ceph_clock_now() instead to make optracker happy
Signed-off-by: Mingxin Liu mingxin@xsky.com