From 4b7b8d88d8e9c8081d16fb8f16076be3ffc7080e Mon Sep 17 00:00:00 2001 From: Alex Ainscow Date: Mon, 27 Apr 2026 17:46:40 +0100 Subject: [PATCH] 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) --- src/osd/ECCommon.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/ECCommon.cc b/src/osd/ECCommon.cc index 13bf7ff3d0a..a109346b039 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; -- 2.47.3