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

   ## What changes were proposed in this pull request?
   
   SnapshotChainManager updates the global snapshot chain before updating the 
per-path chain. If path validation fails, the global chain remains changed 
while the path chain does not.
   
   For example, adding a snapshot with a valid global predecessor but a missing 
path predecessor throws an exception after inserting the snapshot into the 
global chain. Similarly, deleting a snapshot with a mismatched path removes its 
global entry while leaving its path entry intact.
   
   This change validates both chains before modifying either, under the 
existing synchronized methods. Deletion checks membership and neighbors in both 
chains and rejects inconsistent membership before removing the snapshot.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-16465](https://issues.apache.org/jira/browse/HDDS-16465)
   
   ## How was this patch tested?
   
   Added regression tests covering failed insertion into empty and nonempty 
chains, and deletion with a mismatched path.
   
   All 20 tests in TestSnapshotChain passed. Checkstyle and git diff --check 
passed.


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