Fix name and use of CORE_CLUSTER_RECOVER_TIMEOUT_SEC
This commit is contained in:
parent
e306d20d55
commit
787948080b
@ -55,6 +55,7 @@ type Cluster interface {
|
||||
Leave(origin, id string) error // gracefully remove a node from the cluster
|
||||
TransferLeadership(origin, id string) error // transfer leadership to another node
|
||||
Snapshot(origin string) (io.ReadCloser, error)
|
||||
IsRaftLeader() bool
|
||||
HasRaftLeader() bool
|
||||
|
||||
ProcessAdd(origin string, config *app.Config) error
|
||||
|
||||
@ -33,7 +33,9 @@ func (c *cluster) establishFollowership(ctx context.Context) {
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
c.cancelFollowerShip = cancel
|
||||
|
||||
go c.recoverCluster(ctx, c.syncInterval)
|
||||
if c.recoverTimeout > 0 {
|
||||
go c.recoverCluster(ctx, c.syncInterval)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *cluster) revokeFollowership() {
|
||||
|
||||
@ -299,7 +299,7 @@ func (d *Config) init() {
|
||||
d.vars.Register(value.NewInt64(&d.Cluster.SyncInterval, 5), "cluster.sync_interval_sec", "CORE_CLUSTER_SYNC_INTERVAL_SEC", nil, "Interval between aligning the process in the cluster DB with the processes on the nodes", true, false)
|
||||
d.vars.Register(value.NewInt64(&d.Cluster.NodeRecoverTimeout, 120), "cluster.node_recover_timeout_sec", "CORE_CLUSTER_NODE_RECOVER_TIMEOUT_SEC", nil, "Timeout for a node to recover before rebalancing the processes", true, false)
|
||||
d.vars.Register(value.NewInt64(&d.Cluster.EmergencyLeaderTimeout, 10), "cluster.emergency_leader_timeout_sec", "CORE_CLUSTER_EMERGENCY_LEADER_TIMEOUT_SEC", nil, "Timeout for establishing the emergency leadership after lost contact to raft leader", true, false)
|
||||
d.vars.Register(value.NewInt64(&d.Cluster.RecoverTimeout, 0), "cluster.recover_timeout_sec", "CORE_CLUSTER_NODE_RECOVER_TIMEOUT_SECONDS", nil, "Timeout for recovering the cluster if no leader can be voted", false, false)
|
||||
d.vars.Register(value.NewInt64(&d.Cluster.RecoverTimeout, 0), "cluster.recover_timeout_sec", "CORE_CLUSTER_RECOVER_TIMEOUT_SEC", nil, "Timeout for recovering the cluster if no raft leader can be elected", false, false)
|
||||
d.vars.Register(value.NewBool(&d.Cluster.Debug.DisableFFmpegCheck, false), "cluster.debug.disable_ffmpeg_check", "CORE_CLUSTER_DEBUG_DISABLE_FFMPEG_CHECK", nil, "Disable checking for identical FFmpeg versions on all nodes", false, false)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user