From e03baf43fc5b0d5c89e57ddd6bb256d404daf0d8 Mon Sep 17 00:00:00 2001 From: Zhi Zhang Date: Thu, 7 Jun 2018 14:18:15 +0800 Subject: [PATCH] common/DecayCounter: set last_decay to current time when decoding decay counter The last_decay in the msg might be 0 (utime_t()), so the eclipse time is very large and the original value would be decayed to 0. We should set last_decay to current time when decoding decay counter. Fixes: http://tracker.ceph.com/issues/24440 Signed-off-by: Zhi Zhang (cherry picked from commit 25166273764417258c9ad5bd9861d01875d25a1e) --- src/common/DecayCounter.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/DecayCounter.cc b/src/common/DecayCounter.cc index 86562b3e99a1..fb2e0764abbf 100644 --- a/src/common/DecayCounter.cc +++ b/src/common/DecayCounter.cc @@ -38,6 +38,7 @@ void DecayCounter::decode(const utime_t &t, bufferlist::iterator &p) decode(val, p); decode(delta, p); decode(vel, p); + last_decay = t; DECODE_FINISH(p); } -- 2.47.3