From: Alex Ainscow Date: Thu, 8 May 2025 15:14:03 +0000 (+0100) Subject: osd: Cope with empty reads from an OSD without panic. X-Git-Tag: v20.1.0~68^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9279d1c684a3741397095abfa8985cc7e495e613;p=ceph.git osd: Cope with empty reads from an OSD without panic. 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 (cherry picked from commit 8c92dcf6c0092f4dd140bb712ce4a38990a3cba2) --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 92a9300ab59..9740c77ba16 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -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;