smengcl opened a new pull request, #9810: URL: https://github.com/apache/ozone/pull/9810
## What changes were proposed in this pull request? In isSnapshotPurged() check, snapshot chain tableKey returning null should not be the sole indicator for judging whether the snapshot is still active or not. isSnapshotPurged() incorrectly returning true causes checkOrphanSnapshotVersions() to incorrectly removing active snapshot's YAML metadata (in OmSnapshotLocalDataManagerService runs). This in turn causes NPE in CacheLoader when attempting to load the snapshot. - Fixed `isSnapshotPurged()` check - Added relevant debug logging messages that might be helpful at some point - Add entries to snapshotIdToTableKey in case of Raft replay in OMSnapshotCreateResponse#addToDBBatch (which was a bug / an oversight previously) ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14699 ## How was this patch tested? - Added test `testCheckOrphanSnapshotVersionsWithStaleSnapshotChain` - Manually tested downstream that with the patch, the issue does not appear in the system test suite -- 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]
