amaliujia opened a new pull request, #1639: URL: https://github.com/apache/ratis/pull/1639
## What changes were proposed in this pull request? When a Raft server shuts down, `StateMachineUpdater.stopAndJoin()` sets the stop index to the last committed index. It then wakes up the updater thread and waits until every committed entry up to that index has been applied and the state machine has been closed (or it hits a timeout parameter and then force shutdown). Right now this wait logs nothing at the start or the end, so it is hard to tell: when the state machine started to stop, how many entries were still waiting to be applied, and how long the apply-and-close step took, or whether it is stuck. This JIRA proposes adding two INFO logs to `stopAndJoin()`: 1. *Start:* written before the stop index is set. It logs the state machine class, `lastApplied` and `lastCommitted`. 2. *End:* written after `updater.join()` returns. It logs the elapsed time in milliseconds, `stopIndex` and the final `lastApplied`. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/RATIS-2745 ## How was this patch tested? Just extra logs -- 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]
