]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerLaura Flores <lflores@ibm.com>
Wed, 9 Jul 2025 15:47:25 +0000 (15:47 +0000)
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>
(cherry picked from commit 8c92dcf6c0092f4dd140bb712ce4a38990a3cba2)

src/osd/ECBackend.cc

index 92a9300ab594b9ff0c6ed29d34f251f9022129cc..9740c77ba1694abc1d480c29ff7e7006746a1603 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;