Skip to content

osd_types: Restore new_object marking for delete missing entries#62705

Merged
SrinivasaBharath merged 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-pglog-missing-validation
May 4, 2025
Merged

osd_types: Restore new_object marking for delete missing entries#62705
SrinivasaBharath merged 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-pglog-missing-validation

Conversation

@NitzanMordhai
Copy link
Contributor

@NitzanMordhai NitzanMordhai commented Apr 7, 2025

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

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

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 <nmordech@redhat.com>
@NitzanMordhai NitzanMordhai requested a review from athanatos April 7, 2025 13:08
@NitzanMordhai NitzanMordhai requested a review from a team as a code owner April 7, 2025 13:08
@github-actions github-actions bot added the core label Apr 7, 2025
@ronen-fr
Copy link
Contributor

ronen-fr commented Apr 7, 2025

A missed chance to ref the "The Haves and the Have Nots" TV series...

@sseshasa
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants