apple / swift-cluster-membership

Distributed Membership Protocol implementations in Swift
https://apple.github.io/swift-cluster-membership/
Apache License 2.0
201 stars 20 forks source link

SWIMNIO: the startMonitoring / initial contact points should get a max nr of attempts #32

Open ktoso opened 4 years ago

ktoso commented 4 years ago

Today we just try once ~keep trying forever~ to contact the initial contact points; there should be some maximum number of attempts

This should update receiveStartMonitoring(node: Node) { to make a small timer and have counts for the attempts

ktoso commented 4 years ago

Also improve the log statements then, e.g.

self.log.debug("Failed to initial ping, will try again (\(attempt)/\(maxAttempts) attempts made)", metadata: ["ping/target": "\(node)", "error": "\(error)"])