]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: In optimized EC send empty transactions to non-primaries if object is recovering.
authorAlex Ainscow <aainscow@uk.ibm.com>
Thu, 22 May 2025 13:37:56 +0000 (14:37 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Tue, 1 Jul 2025 12:03:30 +0000 (13:03 +0100)
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/ECCommon.cc

index e63d310a911af8ccd8134e60b7d44444d54821e9..da6e5b9e40897bbe320d0000c8720aaa4888bd98 100644 (file)
@@ -734,14 +734,20 @@ void ECCommon::RMWPipeline::cache_ready(Op &op) {
       delete f;
       *_dout << dendl;
     }
-    if (op.skip_transaction(pending_roll_forward, shard, transaction)) {
+    bool should_send = get_parent()->should_send_op(pg_shard, op.hoid);
+    /* should_send being false indicates that a recovery is going on to this
+     * object this makes it critical that the log on the non-primary shards is
+     * complete:- We may need to update "missing" with the latest version.
+     * As such we must never skip a transaction completely.  Note that if
+     * should_send is false, then an empty transaction is sent.
+     */
+    if (should_send && op.skip_transaction(pending_roll_forward, shard, transaction)) {
       // Must be an empty transaction
       ceph_assert(transaction.empty());
       dout(20) << __func__ << " Skipping transaction for shard " << shard << dendl;
       continue;
     }
     op.pending_commits++;
-    bool should_send = get_parent()->should_send_op(pg_shard, op.hoid);
     const pg_stat_t &stats =
         (should_send || !backfill_shards.contains(pg_shard))
           ? get_info().stats