]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: EC optimizations keep log entries on all shards
authorBill Scales <bill_scales@uk.ibm.com>
Fri, 11 Jul 2025 11:59:40 +0000 (12:59 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 7 Sep 2025 23:10:41 +0000 (00:10 +0100)
When a shard is backfilling it gets given log entries
for partial writes even if they do not apply to the
shard. The code was updating the missing list but
discarding the log entry. This is wrong because the
update can be rolled backwards and the log entry is
required to revert the update to the missing list.
Keeping the log entry has a small but insignificant
performance impact.

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

src/osd/PGLog.h

index 4ece20c0e13550ad1dc4c8b937b2e2dcf111c2a0..1430f94965839d024100dc61dd164d26658bf346 100644 (file)
@@ -1404,11 +1404,7 @@ public:
       invalidate_stats = invalidate_stats || !p->is_error();
       if (log) {
        ldpp_dout(dpp, 20) << "update missing, append " << *p << dendl;
-        // Skip the log entry if it is a partial write that did not involve
-        // this shard
-        if (!pool.is_nonprimary_shard(shard) || p->is_written_shard(shard)) {
-         log->add(*p);
-       }
+       log->add(*p);
       }
       if (p->soid <= last_backfill &&
          !p->is_error()) {