Skip to content

Commit 8c92dcf

Browse files
committed
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 <[email protected]>
1 parent 4332a18 commit 8c92dcf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/osd/ECBackend.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,9 @@ void ECBackend::handle_sub_read_reply(
12461246
rop.complete.emplace(hoid, &sinfo);
12471247
}
12481248
auto &complete = rop.complete.at(hoid);
1249+
if (!req.shard_reads.contains(from.shard)) {
1250+
continue;
1251+
}
12491252
const shard_read_t &read = req.shard_reads.at(from.shard);
12501253
if (!complete.errors.contains(from)) {
12511254
dout(20) << __func__ <<" read:" << read << dendl;

0 commit comments

Comments
 (0)