From: Nitzan Mordechai Date: Wed, 26 Mar 2025 08:20:15 +0000 (+0000) Subject: osd_types: Restore new_object marking for delete missing entries X-Git-Tag: testing/wip-vshankar-testing-20250618.062526-reef-debug~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9dc4f74f09b4008476b0aa36bc1fb909357c1eba;p=ceph-ci.git osd_types: Restore new_object marking for delete missing entries Recent changes (PR #29893) removed the “new_object” parameter from missing.add() and the pg_missing_item constructor. As a result, when processing delete log entries, if an object is found on disk, its on‑disk version is stored as “have” instead of the default eversion_t() (0'0). The invariant in read_log_and_missing() then fails because delete entries are expected to have “have” set to eversion_t(). This patch reintroduces the following check: if (have == eversion_t()) clean_regions.mark_object_new(); By doing so, we ensure that when the on‑disk “have” is default, the missing record is marked as new—restoring the previous behavior and satisfying the invariant for delete operations. Fixes: https://tracker.ceph.com/issues/45702 Signed-off-by: Nitzan Mordechai (cherry picked from commit 4289371b20bb437ad38ded92bc53f5b192a8a16e) --- diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 5a50a32e7c3..f5e7a15e746 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -4644,6 +4644,8 @@ struct pg_missing_item { set_delete(is_delete); if (old_style) clean_regions.mark_fully_dirty(); + if (have == eversion_t()) + clean_regions.mark_object_new(); } void encode(ceph::buffer::list& bl, uint64_t features) const {