echonesis opened a new pull request, #11841: URL: https://github.com/apache/ozone/pull/11841
## What changes were proposed in this pull request? Snapshot diff opens the from and to snapshots sequentially, acquiring their `SNAPSHOT_DB_LOCK` stripes in caller order. Checkpoint creation and follower bootstrap acquire all stripes in ascending order. These conflicting acquisition orders can permanently deadlock OM. This pull request: - Acquires both snapshots’ DB read locks in stripe order through `MultiSnapshotLocks` before opening either snapshot. - Validates the expected snapshot UUID when opening snapshots, including within delta computation, so snapshot name reuse cannot introduce an unprotected stripe. - Releases the snapshot handles and ordered locks when the diff completes, returns early, or fails. - Adds tests covering lock pre-acquisition, opening failures, identical snapshots, snapshot name reuse, and lock/reference-count cleanup. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16685 ## How was this patch tested? Local Tests ``` # Unit Tests mvn -pl :ozone-manager -am test \ -Dtest=TestOmSnapshotManager,TestSnapshotDiffManager,TestFileLinkDeltaFileComputer,TestFullDiffComputer,TestCompositeDeltaDiffComputer \ -Dsurefire.failIfNoSpecifiedTests=false \ -DskipShade -DskipRecon -DskipDocs # Integration Test mvn -pl :ozone-integration-test -am test \ -Dtest=TestOmSnapshotFsoWithoutNativeLib#testSnapDiff \ -Dsurefire.failIfNoSpecifiedTests=false \ -DskipRecon -DskipDocs ``` GitHub Actions CI: https://github.com/echonesis/ozone/actions/runs/40829320312 Generated-by: Codex (GPT-6) -- 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]
