From: Sage Weil Date: Thu, 15 Nov 2012 01:00:57 +0000 (-0800) Subject: mon: calculate failed_since relative to message receive time X-Git-Tag: v0.55~92^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ef4e4c8287077e33f17c3b4f3848d1db395126d2;p=ceph.git mon: calculate failed_since relative to message receive time Instead of looking at the current time we process the message, look at the receive time. This gives us a more real failure time given that messages may be requeued. It doesn't solve the problem when messages are forwarded between monitors due to an election, but that's ok; this is still a net improvement. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 21ae96806e41..bad579048f24 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -768,7 +768,7 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) // calculate failure time utime_t now = ceph_clock_now(g_ceph_context); - utime_t failed_since = now - utime_t(m->failed_for ? m->failed_for : g_conf->osd_heartbeat_grace, 0); + utime_t failed_since = m->get_recv_stamp() - utime_t(m->failed_for ? m->failed_for : g_conf->osd_heartbeat_grace, 0); if (m->if_osd_failed()) { // add a report