]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: Relax missing entry assert for partial writes.
authorAlex Ainscow <aainscow@uk.ibm.com>
Fri, 3 Oct 2025 12:35:48 +0000 (13:35 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Thu, 9 Oct 2025 13:44:45 +0000 (14:44 +0100)
This assert was relaxed to allow for missing partial write logs. However
it needs to be relaxed further to cope with the missing list not containing
some objects with later log entries.

Fixes tracker https://tracker.ceph.com/issues/73248

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit 839360365b7b8278c7831b27486f58c440456f89)

src/osd/PGLog.h

index 1430f94965839d024100dc61dd164d26658bf346..50a8a2898a5ac757be8d74adc7d6a0e04bb1d128 100644 (file)
@@ -1184,9 +1184,11 @@ protected:
       if (objiter->second->is_update() ||
          (missing.may_include_deletes && objiter->second->is_delete())) {
        if (ec_optimizations_enabled) {
-         // relax the assert for partial writes - missing may be newer than the
-         // most recent log entry
-         ceph_assert(missing.is_missing(hoid) &&
+         // relax the assert for partial writes. The log may not contain any
+         // updates for this object, in which case the object will not be in
+         // the missing list. If it is in the missing list, then the need version
+         // had better be higher or equal to the log version
+         ceph_assert(!missing.is_missing(hoid) ||
                      missing.get_items().at(hoid).need >= objiter->second->version);
        } else {
          ceph_assert(missing.is_missing(hoid) &&