]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
heartbeatmap: fix reset_timeout with mixed-used threads
authorSage Weil <sage@newdream.net>
Mon, 29 Aug 2011 22:02:37 +0000 (15:02 -0700)
committerSage Weil <sage@newdream.net>
Mon, 29 Aug 2011 22:02:46 +0000 (15:02 -0700)
If you have a ThreadPool used by multiple WorkQueues, and some of them are
setting a suicide timeout, we need to clear it when a suicide timeout is
not set.

Signed-off-by: Sage Weil <sage@newdream.net>
src/common/HeartbeatMap.cc

index a571859f620367f7dc0d650c8ad4c794dd208013..6963ad5bfa20d1536496251827d8fbb817afd502 100644 (file)
@@ -92,6 +92,8 @@ void HeartbeatMap::reset_timeout(heartbeat_handle_d *h, time_t grace, time_t sui
 
   if (suicide_grace)
     h->suicide_timeout.set(now + suicide_grace);
+  else
+    h->suicide_timeout.set(0);
   h->suicide_grace = suicide_grace;
 }