]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/LogMonitor: tolerate external_log_to in the future
authorSage Weil <sage@newdream.net>
Wed, 14 Jul 2021 16:15:15 +0000 (12:15 -0400)
committerSage Weil <sage@newdream.net>
Wed, 14 Jul 2021 16:15:15 +0000 (12:15 -0400)
This can be fast-forwarded by a sync_force or other mon thrashing events.

In any case, if we see it in the future, it is easy to rewind.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/LogMonitor.cc

index 33f3e9d07fcdad7591b819422d1b485f8e12e77c..96d0a6181db533156449fe08045618605f4f7fe4 100644 (file)
@@ -454,7 +454,11 @@ void LogMonitor::log_external_backlog()
     }
   }
   // we may have logged ahead of summary.version, but never ahead of paxos
-  assert(external_log_to <= get_last_committed());
+  if (external_log_to > get_last_committed()) {
+    derr << __func__ << " rewinding external_log_to from " << external_log_to
+        << " -> " << get_last_committed() << " (sync_force? mon rebuild?)" << dendl;
+    external_log_to = get_last_committed();
+  }
   if (external_log_to >= summary.version) {
     return;
   }