From: Alex Ainscow Date: Mon, 27 Apr 2026 16:46:40 +0000 (+0100) Subject: osd: Avoid assertion on empty object read when reading multiple objects X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4b7b8d88d8e9c8081d16fb8f16076be3ffc7080e;p=ceph.git osd: Avoid assertion on empty object read when reading multiple objects Tracker 75432 hits an assert which is attempting to protect the system against hanging, due to generating a read request which sends no messages. The assert fired because recovery was attempting to read multiple objects in a single read request. One object did not require any further shard reads in order to recover, while the other did. The consequence is that the assert fired on one of the objects. The problem is simply that the assert is in the wrong place. Conflicts: src/test/osd/TestECFailoverWithPeering.cc Unit tests not included as they rely on a new unit test framework in main. Fixes: https://tracker.ceph.com/issues/75432 Signed-off-by: Alex Ainscow (cherry picked from commit 5994e2a7faa49d03a65c4a9c126b2b9a1d24c3da) --- diff --git a/src/osd/ECCommon.cc b/src/osd/ECCommon.cc index 13bf7ff3d0a0..a109346b0392 100644 --- a/src/osd/ECCommon.cc +++ b/src/osd/ECCommon.cc @@ -493,8 +493,8 @@ void ECCommon::ReadPipeline::do_read_op(ReadOp &rop) { } } ceph_assert(!need_attrs); - ceph_assert(reads_sent); } + ceph_assert(reads_sent); std::optional local_read_op; std::vector> m;