HDDS-15389. Top-level delete entry retention utilities for snapshot diff.#10750
Draft
SaketaChalamchala wants to merge 1 commit into
Draft
HDDS-15389. Top-level delete entry retention utilities for snapshot diff.#10750SaketaChalamchala wants to merge 1 commit into
SaketaChalamchala wants to merge 1 commit into
Conversation
SaketaChalamchala
requested review from
jojochuang,
peterxcli,
sadanand48 and
smengcl
July 14, 2026 04:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SnapshotDiffManagerfor 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.hasDeletedAncestorto walk thefrom-snapshotparent graph and detect whether a delete entry falls under a deleted directory.filterTopLevelDeletedEntriesto 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).