]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: txsize should be greater or eq to prune_interval - 1 21430/head
authorKefu Chai <kchai@redhat.com>
Sat, 14 Apr 2018 00:58:53 +0000 (08:58 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 15 Apr 2018 13:41:03 +0000 (21:41 +0800)
so we can prune 1 or more intervals in a single iteration. and in each
interval, we prune (prune_interval - 1) versions of osdmap.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/OSDMonitor.cc

index 2694011e97013e45b79c7c91b916029ec4f4a156..6e8e533130c777fa1fa68a0393e7d4a75b8797b7 100644 (file)
@@ -1776,10 +1776,10 @@ bool OSDMonitor::_prune_sanitize_options() const
     r = false;
   }
 
-  if (txsize <= prune_interval) {
+  if (txsize < prune_interval - 1) {
     derr << __func__
          << "'mon_osdmap_full_prune_txsize' (" << txsize
-         << ") <= 'mon_osdmap_full_prune_interval' (" << prune_interval
+         << ") < 'mon_osdmap_full_prune_interval-1' (" << prune_interval - 1
          << "); abort." << dendl;
     r = false;
   }