Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanUpgradeToV310 ¶
func CanUpgradeToV310(nhConfig config.NodeHostConfig) (bool, error)
CanUpgradeToV310 determines whether your production dataset is safe to use the v3.0.3 or higher version of Dragonboat. You need to stop your NodeHost before invoking CanUpgradeToV310.
CanUpgradeToV310 checks whether there is any snapshot that has already been streamed or imported but has not been fully applied into user state machine yet.
The input parameter nhConfig should be the same NodeHostConfig instance you use to initiate your NodeHost object. CanUpgradeToV310 returns a boolean flag indicating whether it is safe to upgrade. If it returns false, you can restart your NodeHost using the existing version of Dragonboat, e.g. v3.0.2, to allow pending snapshots to be fully applied. Repeat the above steps until CanUpgradeToV310 returns true.
Note that for the vast majority cases, CanUpgradeToV310 is expected to return true after its first run, which means it is safe to go ahead and upgrade the Dragonboat version.
Types ¶
This section is empty.