[
https://issues.apache.org/jira/browse/RATIS-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Glen Geng resolved RATIS-1370.
------------------------------
Resolution: Not A Problem
> StateMachine updater should not applyTransactions if stateMachine is in
> paused state
> ------------------------------------------------------------------------------------
>
> Key: RATIS-1370
> URL: https://issues.apache.org/jira/browse/RATIS-1370
> Project: Ratis
> Issue Type: Bug
> Components: server
> Reporter: Shashikant Banerjee
> Assignee: Glen Geng
> Priority: Major
> Fix For: 1.1.0
>
>
> Currently, after install snapshot is completed, the stateMachine is paused
> and the stateMachineUpdater is reloaded. Post the reload, if the stateMachine
> is still in paused state, applyTransaction should not be called on the
> stateMachine.
> It would also be preferarble to move the reitilalize to the BaseStateMachine
> to esnure the StateMachine transitions to running state post reload of
> StateMachineUpdater.
> {code:java}
> @Override
> public synchronized void reinitialize() throws IOException {
> LOG.info("Reinitializing " + this);
> loadSnapshot(storage.findLatestSnapshot());
> if (getLifeCycleState() == LifeCycle.State.PAUSED) {
> getLifeCycle().transition(LifeCycle.State.STARTING);
> getLifeCycle().transition(LifeCycle.State.RUNNING);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)