Skip to content

HDDS-15389. Top-level delete entry retention utilities for snapshot diff.#10750

Draft
SaketaChalamchala wants to merge 1 commit into
apache:masterfrom
SaketaChalamchala:HDDS-15389
Draft

HDDS-15389. Top-level delete entry retention utilities for snapshot diff.#10750
SaketaChalamchala wants to merge 1 commit into
apache:masterfrom
SaketaChalamchala:HDDS-15389

Conversation

@SaketaChalamchala

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Developed with the help of Cursor AI.

This PR is intended as the foundation for a more efficient snapshot diff (HDDS-9154).

Baseline snapshot diff can report descendant deletes inconsistently when a top-level directory is removed. Depending on deep-cleaning progress and diff mode(full or DAG based diff), the report may include child directories and files in addition to the top-level directory delete. The efficient diff design requires stable, top-level-only delete reporting for FSO buckets.

This change adds isolated delete-retention helpers in SnapshotDiffManager for the efficient snapshot diff. It introduces ancestor-based suppression of delete entries so that snapshot diff reports only surface top-level deletes, not redundant descendant directory or file deletes under a deleted directory tree.

  • Adds hasDeletedAncestor to walk the from-snapshot parent graph and detect whether a delete entry falls under a deleted directory.
  • Adds filterTopLevelDeletedEntries to filter mixed directory/file DELETE candidates, keeping only entries without a deleted directory ancestor.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15389

(Please replace this section with the link to the Apache JIRA)

How was this patch tested?

Unit tests covering multiple FSO hierarchy scenarios (e.g. dirA/dirB/dirC/fileA and dirA/dirB/dirD).

@SaketaChalamchala SaketaChalamchala added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-gen snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants