You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "amaliujia (via GitHub)" <gi...@apache.org> on 2026/10/14 05:27:48 UTC
[PR] RATIS-2745. Add start/end logs for StateMachineUpdater.stopAndJoin [ratis]
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2745. Add start/end logs for StateMachineUpdater.stopAndJoin [ratis]
Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo merged PR #1639:
URL: https://github.com/apache/ratis/pull/1639
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2745. Add start/end logs for StateMachineUpdater.stopAndJoin [ratis]
Posted by "amaliujia (via GitHub)" <gi...@apache.org>.
amaliujia commented on PR #1639:
URL: https://github.com/apache/ratis/pull/1639#issuecomment-6183044873
@szetszwo makes sense Don
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org