From: Sage Weil Date: Wed, 14 Jul 2021 16:15:15 +0000 (-0400) Subject: mon/LogMonitor: tolerate external_log_to in the future X-Git-Tag: v17.1.0~1381^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42338%2Fhead;p=ceph.git mon/LogMonitor: tolerate external_log_to in the future 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 --- diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index 33f3e9d07fcd..96d0a6181db5 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -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; }