From 907b4b148c0f961235846afd0cf362eaa09ad13f Mon Sep 17 00:00:00 2001 From: Bill Scales Date: Fri, 25 Apr 2025 15:03:02 +0100 Subject: [PATCH] osd: overaggressive assert in read_log_and_missing with optimized EC pool read_log_and_missing is called during OSD initializaiton to sanity check the PG log. One of its checks is too agressive for an optimized EC pool where because of a partial write there can be a log entry but no update to the object on this shard (other shards will have been updated). The fix is to skip the checks when the log entry indicates this shard was not updated. Only affects pool with allow_ec_optimizations flag on. Signed-off-by: Bill Scales (cherry picked from commit c8739a2bdb0bf523402d85517a7fce39d445eef5) --- src/osd/PGLog.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 455fc446418..7aa3d17f1f6 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -1614,6 +1614,10 @@ public: continue; if (i->is_error()) continue; + if (!i->is_written_shard(info.pgid.shard)) { + // optimized EC - partial write that this shard didn't participate in + continue; + } if (did.count(i->soid)) continue; did.insert(i->soid); -- 2.39.5