diff --git a/internal/cluster/cluster_lifetime.go b/internal/cluster/cluster_lifetime.go index b4d1b92f92..3f40c90371 100644 --- a/internal/cluster/cluster_lifetime.go +++ b/internal/cluster/cluster_lifetime.go @@ -27,7 +27,7 @@ const ( // each node will also update its own status to remain active. If a node becomes inactive, it will be removed from the cluster. NODE_VOTE_INTERVAL = time.Second * 30 // interval to vote the ips of the nodes UPDATE_NODE_STATUS_INTERVAL = time.Second * 5 // interval to update the status of the node - NODE_DISCONNECTED_TIMEOUT = time.Second * 10 // once a node is no longer active, it will be removed from the cluster + NODE_DISCONNECTED_TIMEOUT = time.Second * 25 // once a node is no longer active, it will be removed from the cluster // plugin scheduler // each node will schedule its plugins every $PLUGIN_SCHEDULER_INTERVAL time diff --git a/internal/cluster/vote.go b/internal/cluster/vote.go index 545a5449f5..301d383bc7 100644 --- a/internal/cluster/vote.go +++ b/internal/cluster/vote.go @@ -51,7 +51,7 @@ func (c *Cluster) voteAddresses() error { } } - ipsVoting[addr.fullAddress()] = c.voteAddress(addr) == nil + ipsVoting[addr.fullAddress()] = time.Since(time.Unix(nodeStatus.LastPingAt, 0)) < c.nodeDisconnectedTimeout } // lock the node status