]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: EC Optimizations proc_replica_log needs to apply pwlc
authorBill Scales <bill_scales@uk.ibm.com>
Thu, 19 Jun 2025 12:41:17 +0000 (13:41 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 7 Sep 2025 23:10:41 +0000 (00:10 +0100)
PeeringState::proc_replica_log needs to apply pwlc before
calling PGLog so that any partial writes that have occurred
are taken into account when working out where a replica/stray
has diverged from the primary.

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
(cherry picked from commit 6c3c0a88b68e2548df670dbe9797d54f89259398)

src/osd/PeeringState.cc
src/osd/PeeringState.h

index 925a05610b2dac92ae03c3d1f2dca5edaa76e2c1..4514cfc1a5ce02989c604fabbd03d46c89cbcf8b 100644 (file)
@@ -3417,13 +3417,17 @@ void PeeringState::proc_master_log(
 
 void PeeringState::proc_replica_log(
   pg_info_t &oinfo,
-  const pg_log_t &olog,
+  pg_log_t &olog,
   pg_missing_t&& omissing,
   pg_shard_t from)
 {
   psdout(10) << "proc_replica_log for osd." << from << ": "
             << oinfo << " " << olog << " " << omissing << dendl;
 
+  if (info.partial_writes_last_complete.contains(from.shard)) {
+    apply_pwlc(info.partial_writes_last_complete[from.shard], from, oinfo,
+              &olog);
+  }
   pg_log.proc_replica_log(oinfo, olog, omissing, from, pool.info.allows_ecoptimizations());
 
   peer_info[from] = oinfo;
index d3039244ca5d7b8654127f8dc9c56c44ebe28fff..d87eb7cc6bccec27c08a8fb567ae906a1249c584 100644 (file)
@@ -1787,7 +1787,7 @@ private:
   void proc_master_log(ObjectStore::Transaction& t, pg_info_t &oinfo,
                       pg_log_t&& olog, pg_missing_t&& omissing,
                       pg_shard_t from);
-  void proc_replica_log(pg_info_t &oinfo, const pg_log_t &olog,
+  void proc_replica_log(pg_info_t &oinfo, pg_log_t &olog,
                        pg_missing_t&& omissing, pg_shard_t from);
 
   void calc_min_last_complete_ondisk();