You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Bharat Viswanadham (Jira)" <ji...@apache.org> on 2021/04/29 12:22:00 UTC

[jira] [Updated] (HDDS-5169) Make a clear seperation between installSnapshot and reinitialize in OMStateMachine

     [ https://issues.apache.org/jira/browse/HDDS-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bharat Viswanadham updated HDDS-5169:
-------------------------------------
    Description: 
During snapshot installation, notifyInstallSnapshot should download snapshot from leader.

Once the future is complete, Ratis puts state machine to pause, and reloadStateMachine which sets state machine updater to reload and do reinitializeStateMachine.

In-state machine reinitialize replace the DB checkpoint and make things ready to work with this new snapshot.

As with the current model, there is a chance the DB can be modified by StateMachineUpdater thread.


1 follower’s log is 1 to 1000,
2 leader’s log is 10000 to larger,
3, SMUpdater’s applied index is 500 (it is possible right)
4, the append entries trigger follower to download snapshot, then PAUSED, then RUNNING
5, here is the bomb, since SMUpdater is in RUNNING state, it apply log 501 to SM, which is reinitialzied.



  was:
During snapshot installation, notifyInstallSnapshot should download snapshot from leader.

Once the future is complete, Ratis puts state machine to pause, and reloadStateMachine which sets state machine updater to reload and do reinitializeStateMachine.

In-state machine reinitialize replace the DB checkpoint and make things ready to work with this new snapshot.


> Make a clear seperation between installSnapshot and reinitialize in OMStateMachine
> ----------------------------------------------------------------------------------
>
>                 Key: HDDS-5169
>                 URL: https://issues.apache.org/jira/browse/HDDS-5169
>             Project: Apache Ozone
>          Issue Type: Task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>
> During snapshot installation, notifyInstallSnapshot should download snapshot from leader.
> Once the future is complete, Ratis puts state machine to pause, and reloadStateMachine which sets state machine updater to reload and do reinitializeStateMachine.
> In-state machine reinitialize replace the DB checkpoint and make things ready to work with this new snapshot.
> As with the current model, there is a chance the DB can be modified by StateMachineUpdater thread.
> 1 follower’s log is 1 to 1000,
> 2 leader’s log is 10000 to larger,
> 3, SMUpdater’s applied index is 500 (it is possible right)
> 4, the append entries trigger follower to download snapshot, then PAUSED, then RUNNING
> 5, here is the bomb, since SMUpdater is in RUNNING state, it apply log 501 to SM, which is reinitialzied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org