Skip to content

Commit 309a7d3

Browse files
committed
osd_types: Restore new_object marking for delete missing entries
Recent changes (PR ceph#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 <[email protected]> (cherry picked from commit 4289371)
1 parent f1107bf commit 309a7d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/osd/osd_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4869,6 +4869,8 @@ struct pg_missing_item {
48694869
set_delete(is_delete);
48704870
if (old_style)
48714871
clean_regions.mark_fully_dirty();
4872+
if (have == eversion_t())
4873+
clean_regions.mark_object_new();
48724874
}
48734875

48744876
void encode(ceph::buffer::list& bl, uint64_t features) const {

0 commit comments

Comments
 (0)