]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PeeringState: update prior_readable_until_ub on new interval
authorSage Weil <sage@redhat.com>
Tue, 23 Jul 2019 16:39:13 +0000 (11:39 -0500)
committerSage Weil <sage@redhat.com>
Thu, 26 Sep 2019 17:21:53 +0000 (12:21 -0500)
If a new interval starts, apply the old interval's readable_until_ub to
our prior.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PeeringState.cc

index 39a50ed2254e9bad22e61b58891355237d3f330a..7521fb42791b33534bfaf38f5d30d8d105b7cc62 100644 (file)
@@ -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());