Description
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.
@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); }