diff options
author | Sage Weil <sage@inktank.com> | 2013-07-12 21:52:30 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-15 13:42:54 -0700 |
commit | 34f76bd915bd35e638a306c0a8d3e062abcbec6a (patch) | |
tree | 7bc6de459675b4863a5aa3140ca15d08065b6b5a | |
parent | eac559f47460ff59b580862b89c7c4fe8c48e3ca (diff) | |
download | ceph-34f76bd915bd35e638a306c0a8d3e062abcbec6a.tar.gz |
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 <sage@inktank.com>
-rw-r--r-- | src/mon/Monitor.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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 |