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

   Found by TLA+ model checking and code review of the OM optimized snapshot 
diff paths under 
[HDDS-15926](https://issues.apache.org/jira/browse/HDDS-15926), on commit 
https://github.com/apache/ozone/commit/d3b75c75bf9ad475551202477c3a21a3f4b968b7.
   The patch is generated with Specula (Claude Opus 5.5).
   
   ## What changes were proposed in this pull request?
   
   Optimized FSO snapshot diff incorrectly returned an empty report when only 
files were created, deleted, or overwritten under existing directories. In that 
case `directoryTable` has no delta SSTs between the two snapshots, but the 
directory scan stage is still required to build path edges for 
`SnapDiffPathResolver`.
   
   `SnapshotDiffManager.scanTablesForDiff` skipped the entire directory stage 
whenever the delta file list was empty, so 
`DagDiffSequentialReader.scanDirectoryTables` never ran its full from/to 
directory table scans. File entries whose parent was not the bucket root failed 
path resolution and were dropped in `MergeJoinSnapDiffWriter` while the job 
still completed successfully.
   
   This change keeps the fast path when there are no file changes 
(`SnapDiffJobStore` has no new/old list entries). When the file stage produced 
entries but `directoryTable` has an empty delta, the directory stage still runs 
with an empty delta (the reader already handles that case).
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-17745
   
   ## How was this patch tested?
   
   - Added `testOptimizedDiffWithUnchangedDirectoryTable` in 
`TestOptimizedSnapshotDiff` (native Rocks tools enabled): create/delete files 
under an unchanged directory between two snapshots; assert CREATE/DELETE 
entries for ordered and unordered reports.
   - Existing `TestOptimizedSnapshotDiff`, snapshot diff unit tests, and 
`TestSnapshotDiffManager` pass locally.
   


-- 
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