]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/DecayCounter: set last_decay to current time when decoding decay counter 22779/head
authorZhi Zhang <willzzhang@tencent.com>
Thu, 7 Jun 2018 06:18:15 +0000 (14:18 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Jul 2018 18:17:48 +0000 (11:17 -0700)
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 <zhangz.david@outlook.com>
(cherry picked from commit 25166273764417258c9ad5bd9861d01875d25a1e)
Conflicts:
src/common/DecayCounter.cc

src/common/DecayCounter.cc

index 26a552d439c8e71b4356676e591525896dfe2665..823249487a541c3bdc2df6681f4a5f5e0b07a34e 100644 (file)
@@ -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);
 }