smengcl opened a new pull request, #11595: URL: https://github.com/apache/ozone/pull/11595
Generated-by: Claude Code (Opus 5.5) ## What changes were proposed in this pull request? `InterSCMGrpcService` read the transaction info table and built its `SCMDBCheckpointProvider` from `scm.getScmMetadataStore().getStore()` once, in its constructor. The service is created once per SCM process. When an SCM installs a checkpoint in process (for example a follower that is behind when it bootstraps), `SCMHAManagerImpl` closes that store and opens a new one, but the gRPC service keeps the closed one. From then on, whenever that SCM is leader, every checkpoint download from it fails with gRPC `UNKNOWN`, and the leader logs "Error streaming SCM DB checkpoint" with `RocksDatabaseException: Rocks Database is closed`. This lasts until that SCM restarts. The visible effect: an SCM that bootstraps while such an SCM is leader cannot download the leader's checkpoint. This shows up in the disabled `ozonesecure-ha/disabled-test-root-ca-rotation.sh`: after leadership moves from scm1 to scm2, scm4 never joins and scm2 logs the error above. The fix looks up the current store on each `download` request and builds the transaction info table and checkpoint provider from it, so the service never holds a reference to a store that an install can close. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16924 ## How was this patch tested? Added an assertion to `TestSCMInstallSnapshot#testInstallCheckPoint`: after the in-process install, the SCM serves a checkpoint, and that checkpoint carries the installed transaction index. Without the fix it fails with `StatusRuntimeException: UNKNOWN` and "Rocks Database is closed" in the log; with the fix it passes. `TestSCMInstallSnapshot`, `TestSCMInstallSnapshotWithHA`, `TestInterSCMGrpcProtocolService`, `TestInterSCMGrpcClient` and `TestSCMSnapshotProvider` pass locally. Checkstyle is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
