summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2021-07-14 13:31:21 -0700
committerPatrick Donnelly <pdonnell@redhat.com>2021-07-29 08:50:15 -0700
commitb38745e56bcfcc64feb45fbc77f6823dbb3535ed (patch)
tree0f20e5f1955616bc894734cd96b1059b14cb6824
parentf1813f69049a00eb4218bb01bc9f86cbad310606 (diff)
downloadceph-b38745e56bcfcc64feb45fbc77f6823dbb3535ed.tar.gz
mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
The PaxosService code already excludes the value returned by PaxosService::get_trim_to as the upper bound of the range of epochs to trim. Without this fix, you need to set mon_mds_force_trim_to to one greater than the epoch you want to trim _and_ force the current epoch to be one greater than that; the net result being that you can only force trimming up to 2 epochs behind the current epoch. This change is helpful for resolving issue 51673, but not strictly necessary. Related-to: https://tracker.ceph.com/issues/51673 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit d9dc2f11d56fb4341ba5823f8d17459d10f3b2c1) Conflicts: src/common/options/mon.yaml.in: drop doc change
-rw-r--r--src/mon/MDSMonitor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc
index 994531da181..0ce59c79c41 100644
--- a/src/mon/MDSMonitor.cc
+++ b/src/mon/MDSMonitor.cc
@@ -264,7 +264,7 @@ version_t MDSMonitor::get_trim_to() const
{
version_t floor = 0;
if (g_conf()->mon_mds_force_trim_to > 0 &&
- g_conf()->mon_mds_force_trim_to < (int)get_last_committed()) {
+ g_conf()->mon_mds_force_trim_to <= (int)get_last_committed()) {
floor = g_conf()->mon_mds_force_trim_to;
dout(10) << __func__ << " explicit mon_mds_force_trim_to = "
<< floor << dendl;