smengcl opened a new pull request, #11696: URL: https://github.com/apache/ozone/pull/11696
Generated-by: Claude Code (Opus 5.5) ## What changes were proposed in this pull request? At startup, OM and datanode load the current secret key from SCM in `DefaultSecretKeySignerClient.loadInitialSecretKey`. While SCM has not initialized secret keys yet, it retries up to 100 times with exponential backoff that restarts every 10 retries. The base wait goes 2s, 4s, ..., 1024s, randomized by +/-50%, so a single wait can be up to about 25 minutes (about 5.7 hours in total). So after SCM initializes its keys, an OM or datanode can stay stuck for many more minutes before it tries again. This change keeps the exponential backoff but caps the base wait at 16s (2s, 4s, 8s, 16s, 16s, ...). A single wait is at most 24s, and the total for 100 retries is around 26 minutes. The retry policy moves to a package-private method so it can be tested, and the code comment now matches the actual wait times. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17316 ## How was this patch tested? Added `TestDefaultSecretKeyClient#initialSecretKeyRetryWaitIsCapped`, which checks every wait of the 100 retries, and that other errors and the 101st attempt fail. It fails without the fix. 🤖 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]
