From 34f76bd915bd35e638a306c0a8d3e062abcbec6a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 12 Jul 2013 21:52:30 -0700 Subject: [PATCH] mon: set forwarded message recv stamp Set it to the stamp of the MForward that carried us. One could argue we really want the original receive stamp on the origin, but that is not available to us, and this is better than nothing. In particular, this gives 'ceph log ...' commands a timestamp when they are forwarded via a peon. The stamp is still between when the request is sent and when it is committed/acked, so all is well from the client's perspective. Signed-off-by: Sage Weil --- src/mon/Monitor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index b28a5c071ea..9b665bdad3d 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2320,6 +2320,9 @@ void Monitor::handle_forward(MForward *m) m->msg = NULL; // so ~MForward doesn't delete it req->set_connection(c); + // not super accurate, but better than nothing. + req->set_recv_stamp(m->get_recv_stamp()); + /* * note which election epoch this is; we will drop the message if * there is a future election since our peers will resend routed -- 2.47.3