From: Zhi Zhang Date: Thu, 7 Jun 2018 06:18:15 +0000 (+0800) Subject: common/DecayCounter: set last_decay to current time when decoding decay counter X-Git-Tag: v14.0.1~1104^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=25166273764417258c9ad5bd9861d01875d25a1e;p=ceph.git 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 --- diff --git a/src/common/DecayCounter.cc b/src/common/DecayCounter.cc index 398a4d3358e..61c43ff8471 100644 --- a/src/common/DecayCounter.cc +++ b/src/common/DecayCounter.cc @@ -38,6 +38,7 @@ void DecayCounter::decode(const utime_t &t, bufferlist::const_iterator &p) decode(val, p); decode(delta, p); decode(vel, p); + last_decay = t; DECODE_FINISH(p); }