]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: set forwarded message recv stamp 436/head
authorSage Weil <sage@inktank.com>
Sat, 13 Jul 2013 04:52:30 +0000 (21:52 -0700)
committerSage Weil <sage@inktank.com>
Mon, 15 Jul 2013 20:42:54 +0000 (13:42 -0700)
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 <sage@inktank.com>
src/mon/Monitor.cc

index b28a5c071ea2540407ed4a42e960f17b72d9be24..9b665bdad3d6e6f8ce6fe1c12abfcaab0b047568 100644 (file)
@@ -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