From e0d3810d6626731537cc76d9550e4cadddb2f689 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) Conflicts: src/common/DecayCounter.cc --- src/common/DecayCounter.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/DecayCounter.cc b/src/common/DecayCounter.cc index 26a552d439c..823249487a5 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