]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Fri, 25 Jul 2025 07:43:09 +0000 (08:43 +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>
src/osd/PeeringState.cc
src/osd/PeeringState.h

index eaf0b3147aa7c8b934803117e80480c625b6caa7..43b59eccd7a353b3e08d32212ba21bc8d0b8f04e 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 2fba4bead157306ce2069d6c94385b4642161b4f..86f6cfb109a003916aee8d3a38f7e9713bef19ca 100644 (file)
@@ -1789,7 +1789,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();