]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Avoid assertion on empty object read when reading multiple objects 68714/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Mon, 27 Apr 2026 16:46:40 +0000 (17:46 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 6 May 2026 09:41:34 +0000 (10:41 +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.

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 <aainscow@uk.ibm.com>
(cherry picked from commit 5994e2a7faa49d03a65c4a9c126b2b9a1d24c3da)

src/osd/ECCommon.cc

index 13bf7ff3d0a0149abb1dbdf26cbafa55915ab6be..a109346b0392b9c825727ede7de0c8c49c5b322f 100644 (file)
@@ -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<ECSubRead> local_read_op;
   std::vector<std::pair<int, Message*>> m;