From 5994e2a7faa49d03a65c4a9c126b2b9a1d24c3da 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. Fixes: https://tracker.ceph.com/issues/75432 Signed-off-by: Alex Ainscow --- src/osd/ECCommon.cc | 2 +- src/test/osd/TestECFailoverWithPeering.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/ECCommon.cc b/src/osd/ECCommon.cc index 236c45656baa..7cfa18470f9c 100644 --- a/src/osd/ECCommon.cc +++ b/src/osd/ECCommon.cc @@ -496,8 +496,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; diff --git a/src/test/osd/TestECFailoverWithPeering.cc b/src/test/osd/TestECFailoverWithPeering.cc index 2ac088d3975a..3e13572a886c 100644 --- a/src/test/osd/TestECFailoverWithPeering.cc +++ b/src/test/osd/TestECFailoverWithPeering.cc @@ -594,7 +594,7 @@ TEST_P(TestECFailoverWithPeering, MultiObjectRecoveryReadCrash) { * * Expected behavior WITH fix: Test completes successfully. */ -TEST_P(TestECFailoverWithPeering, DISABLED_MultiObjectParallelRecoveryCrash) { +TEST_P(TestECFailoverWithPeering, MultiObjectParallelRecoveryCrash) { // This test requires k >= 3 and m >= 2 if (k < 3 || m < 2) { GTEST_SKIP() << "Test requires k >= 3 and m >= 2"; -- 2.47.3