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: v13.2.1~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22816%2Fhead;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 (cherry picked from commit 25166273764417258c9ad5bd9861d01875d25a1e) --- diff --git a/src/common/DecayCounter.cc b/src/common/DecayCounter.cc index 86562b3e99a..fb2e0764abb 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); }