]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Cope with empty reads from an OSD without panic.
authorAlex Ainscow <aainscow@uk.ibm.com>
Thu, 8 May 2025 15:14:03 +0000 (16:14 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Tue, 1 Jul 2025 12:03:30 +0000 (13:03 +0100)
If a ReadOp from EC contains two objects where one object only reads from a single shard, but
 other onjects require other shards, then this bug can be hit.  The fix should make it clear
 what the issue is

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/ECBackend.cc

index 76f8a8ad11e4d7b81c6c944567e4d3e5804eae83..45f93bf88198ad0932f348bd46d72597f4b6f441 100644 (file)
@@ -1246,6 +1246,9 @@ void ECBackend::handle_sub_read_reply(
       rop.complete.emplace(hoid, &sinfo);
     }
     auto &complete = rop.complete.at(hoid);
+    if (!req.shard_reads.contains(from.shard)) {
+      continue;
+    }
     const shard_read_t &read = req.shard_reads.at(from.shard);
     if (!complete.errors.contains(from)) {
       dout(20) << __func__ <<" read:" << read << dendl;