mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-26 21:51:27 +02:00
multi: add leader check to the healthcheck monitor
This commit extends our healtcheck with an optional leader check. This is to ensure that given network partition or other cluster wide failure we act as soon as possible to avoid a split-brain situation where a new leader is elected but we still hold onto our etcd client.
This commit is contained in:
@@ -315,6 +315,9 @@ func ExtraArgsEtcd(etcdCfg *etcd.Config, name string, cluster bool,
|
||||
leaderSessionTTL),
|
||||
}
|
||||
extraArgs = append(extraArgs, clusterArgs...)
|
||||
extraArgs = append(
|
||||
extraArgs, "--healthcheck.leader.interval=10s",
|
||||
)
|
||||
}
|
||||
|
||||
return extraArgs
|
||||
|
Reference in New Issue
Block a user