]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: Avoid assertion on empty object read when reading multiple objects
authorAlex Ainscow <aainscow@uk.ibm.com>
Mon, 27 Apr 2026 16:46:40 +0000 (17:46 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 3 May 2026 16:56:19 +0000 (17:56 +0100)
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 <aainscow@uk.ibm.com>
src/osd/ECCommon.cc
src/test/osd/TestECFailoverWithPeering.cc

index 236c45656baac7dc905f5ee3d6180c925a897ab7..7cfa18470f9c070cf4fa0289e541dc5e77bf48ba 100644 (file)
@@ -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<ECSubRead> local_read_op;
   std::vector<std::pair<int, Message*>> m;
index 614bad758bafa2c5ef6eeec81c87b8b54591322f..eaff0525028bccd38b362308d2fb17e5b060e65c 100644 (file)
@@ -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";