You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "andyhuangdev (via GitHub)" <gi...@apache.org> on 2026/09/17 08:48:41 UTC

[PR] HDDS-16465. Validate snapshot chains before mutation [ozone]

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16465. Validate snapshot chains before mutation [ozone]

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #11253:
URL: https://github.com/apache/ozone/pull/11253#issuecomment-5768412543

   Thanks @andyhuangdev for the patch.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16465. Validate snapshot chains before mutation [ozone]

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl merged PR #11253:
URL: https://github.com/apache/ozone/pull/11253


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16465. Validate snapshot chains before mutation [ozone]

Posted by "andyhuangdev (via GitHub)" <gi...@apache.org>.
andyhuangdev commented on PR #11253:
URL: https://github.com/apache/ozone/pull/11253#issuecomment-5724200839

   cc @chungen0126 @Russole 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org