Skip to content
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

Merged
merged 1 commit into from Jan 11, 2017

Conversation

LiumxNL
Copy link
Contributor

@LiumxNL LiumxNL commented Jan 9, 2017

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

@LiumxNL
Copy link
Contributor Author

LiumxNL commented Jan 9, 2017

@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)),
Copy link
Member

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

@@ -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()),
Copy link
Contributor

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.

@tchaikov tchaikov added the mon label Jan 9, 2017
so using ceph_clock_now() instead to make optracker happy

Signed-off-by: Mingxin Liu <mingxin@xsky.com>
@LiumxNL
Copy link
Contributor Author

LiumxNL commented Jan 10, 2017

@tchaikov updated

@tchaikov tchaikov self-assigned this Jan 10, 2017
@tchaikov
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants