]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
DO NOT MERGE: osd: Tweaks to PeeringState wip-billscales-issue73249
authorBill Scales <bill_scales@uk.ibm.com>
Fri, 5 Dec 2025 09:39:41 +0000 (09:39 +0000)
committerBill Scales <bill_scales@uk.ibm.com>
Fri, 5 Dec 2025 09:39:41 +0000 (09:39 +0000)
Some tweeaks to PeeringState to refine this fix to avoid updating last_update on
stray shards outside of the acting set because of pwlc. This was causing
problems when a shard had last_complete != last_update because it was just given
an info update so could not update its missing list. If the shard then later
becomes part of the acting set again it causes problems.

MERGE WITH PREVIOUS COMMIT AFTER TESTING

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
src/osd/PeeringState.cc

index c07391bc353737e75c80ae3f395841071fa426c0..98d1d02f205120ef5d88eda0582eceb267954ecf 100644 (file)
@@ -2775,9 +2775,6 @@ bool PeeringState::search_for_missing(
   // add partial write from our info
   tinfo.partial_writes_last_complete = info.partial_writes_last_complete;
   tinfo.partial_writes_last_complete_epoch = info.partial_writes_last_complete_epoch;
-  if (info.partial_writes_last_complete.contains(from.shard)) {
-    apply_pwlc(info.partial_writes_last_complete[from.shard], from, tinfo, AFTER_ACTIVATE);
-  }
   bool found_missing = missing_loc.add_source_info(
     from, tinfo, omissing, ctx.handle);
   if (found_missing && num_unfound_before != missing_loc.num_unfound())
@@ -3210,10 +3207,6 @@ void PeeringState::activate(
          ceph_assert(pi_it != peer_info.end());
          auto pm_it = peer_missing.find(*i);
          ceph_assert(pm_it != peer_missing.end());
-          if (info.partial_writes_last_complete.contains(i->shard)) {
-           apply_pwlc(info.partial_writes_last_complete[i->shard], *i,
-                      pi_it->second, AFTER_ACTIVATE);
-         }
          missing_loc.add_source_info(
            *i,
            pi_it->second,
@@ -7253,7 +7246,7 @@ boost::statechart::result PeeringState::Stray::react(const MInfoRec& infoevt)
   // Log must be consistent with info
   ceph_assert(ps->pg_log.get_head() == ps->info.last_update);
   // Update pwlc
-  ps->update_peer_info(infoevt.from, infoevt.info, AFTER_ACTIVATE);
+  ps->update_peer_info(infoevt.from, infoevt.info, BEFORE_ACTIVATE);
   post_event(Activate(infoevt.info.last_epoch_started));
   return transit<ReplicaActive>();
 }