From 6119f693d620352bcaf25f7b4d286eb47727e93a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 23 Jul 2019 11:39:13 -0500 Subject: [PATCH] osd/PeeringState: update prior_readable_until_ub on new interval If a new interval starts, apply the old interval's readable_until_ub to our prior. Signed-off-by: Sage Weil --- src/osd/PeeringState.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 39a50ed2254e9..7521fb42791b3 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -754,6 +754,20 @@ void PeeringState::on_new_interval() init_hb_stamps(); + // update lease bounds for a new interval + auto mnow = pl->get_mnow(); + prior_readable_until_ub = std::max(prior_readable_until_ub, + readable_until_ub); + prior_readable_until_ub = info.history.refresh_prior_readable_until_ub( + mnow, prior_readable_until_ub); + psdout(10) << __func__ << " prior_readable_until_ub " + << prior_readable_until_ub << " (mnow " << mnow << " + " + << info.history.prior_readable_until_ub << ")" << dendl; + readable_until = + readable_until_ub = + readable_until_ub_sent = + readable_until_ub_from_primary = ceph::signedspan::zero(); + acting_readable_until_ub.clear(); if (is_primary()) { acting_readable_until_ub.resize(acting.size(), ceph::signedspan::zero()); -- 2.39.5