Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/cluster/cluster_lifetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/cluster/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down