Merge pull request #44015 from liewegas/fix-44012

osd/PeeringState: separate history's pruub from pg's

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
Yuri Weinstein 2021-12-13 15:20:51 -08:00 committed by GitHub
commit c3ee11ec12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -2721,6 +2721,11 @@ void PeeringState::activate(
info.purged_snaps.swap(purged);
// start up replicas
if (prior_readable_down_osds.empty()) {
dout(10) << __func__ << " no prior_readable_down_osds to wait on, clearing ub"
<< dendl;
clear_prior_readable_until_ub();
}
info.history.refresh_prior_readable_until_ub(pl->get_mnow(),
prior_readable_until_ub);
@ -6697,10 +6702,10 @@ PeeringState::GetInfo::GetInfo(my_context ctx)
prior_set = ps->build_prior();
ps->prior_readable_down_osds = prior_set.down;
if (ps->prior_readable_down_osds.empty()) {
psdout(10) << " no prior_set down osds, clearing prior_readable_until_ub"
psdout(10) << " no prior_set down osds, will clear prior_readable_until_ub before activating"
<< dendl;
ps->clear_prior_readable_until_ub();
}
ps->reset_min_peer_features();

View File

@ -2096,6 +2096,7 @@ public:
void clear_prior_readable_until_ub() {
prior_readable_until_ub = ceph::signedspan::zero();
prior_readable_down_osds.clear();
info.history.prior_readable_until_ub = ceph::signedspan::zero();
}
void renew_lease(ceph::signedspan now) {