]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: only update beacon epoch if newer
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 6 Apr 2021 15:20:54 +0000 (08:20 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 30 Jul 2021 23:28:53 +0000 (16:28 -0700)
This is a defensive programming change. We don't want the beacon epoch
to ever go backwards.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Beacon.cc

index 89654759187ace4338b4bfafc7a428a37e38eab9..e47c7a4475828cf2b4b1906a45c1e0100f46299d 100644 (file)
@@ -233,7 +233,7 @@ void Beacon::_notify_mdsmap(const MDSMap &mdsmap)
 {
   ceph_assert(mdsmap.get_epoch() >= epoch);
 
-  if (mdsmap.get_epoch() != epoch) {
+  if (mdsmap.get_epoch() >= epoch) {
     epoch = mdsmap.get_epoch();
     compat = MDSMap::get_compat_set_default();
     compat.merge(mdsmap.compat);