SaketaChalamchala opened a new pull request, #10750:
URL: https://github.com/apache/ozone/pull/10750

   ## 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](https://issues.apache.org/jira/browse/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).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to