From: Sage Weil Date: Mon, 29 Aug 2011 22:02:37 +0000 (-0700) Subject: heartbeatmap: fix reset_timeout with mixed-used threads X-Git-Tag: v0.35~187 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=853658e9f1a040fb0a0f262433203d9da92c689f;p=ceph.git heartbeatmap: fix reset_timeout with mixed-used threads 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 --- diff --git a/src/common/HeartbeatMap.cc b/src/common/HeartbeatMap.cc index a571859f6203..6963ad5bfa20 100644 --- a/src/common/HeartbeatMap.cc +++ b/src/common/HeartbeatMap.cc @@ -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; }