hemantk-12 opened a new pull request, #4525: URL: https://github.com/apache/ozone/pull/4525
## What changes were proposed in this pull request? This change is to remove snapshot from the `SnapshotChainManager `in case of any failure.It is possible that `createSnapshot` request fails after snapshot gets added to snapshot chain manager because couldn't add it to cache/DB. In this scenario,` SnapshotChainManager#globalSnapshotId` will point to failed `createSnapshot` request's snapshotId but in actual it doesn't exist in the `SnapshotInfo` table. If it doesn't get removed, OM restart will crash on `SnapshotChainManager#loadFromSnapshotInfoTable` because it could not find the previous snapshot which doesn't exist because it was never added to the `SnapshotInfo` table. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-8345 ## How was this patch tested? It was tested manually by injecting fault before [line](https://github.com/apache/ozone/blob/e8fbdaaca2a32c67aeb5ba8fbd23bb2a271480f2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java#L173) and restart the OM node. Verified that OM restarts successfully after the change. -- 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]
