diff --git a/cluster.go b/cluster.go index 431bd7c61..c4a295072 100644 --- a/cluster.go +++ b/cluster.go @@ -50,9 +50,8 @@ const ( ClusterStateResizing = disco.ClusterStateResizing ClusterStateDown = disco.ClusterStateDown - // NodeState represents the state of a node during startup. - nodeStateReady = "READY" - nodeStateDown = "DOWN" + // nodeStateDown represents the state of a node which is unavailable. + nodeStateDown = "DOWN" // resizeJob states. resizeJobStateRunning = "RUNNING" @@ -213,24 +212,6 @@ func (c *cluster) unprotectedIsCoordinator() bool { return snap.PrimaryFieldTranslationNode().ID == c.Node.ID } -// unprotectedSendSync is used in place of c.broadcaster.SendSync (which is -// Server.SendSync) because Server.SendSync needs to obtain a cluster lock to -// get the list of nodes. TODO: the reference loop from -// Server->cluster->broadcaster(Server) will likely continue to cause confusion -// and should be refactored. -func (c *cluster) unprotectedSendSync(m Message) error { - var eg errgroup.Group - for _, node := range c.noder.Nodes() { - node := node - // Don't send to myself. - if node.ID == c.Node.ID { - continue - } - eg.Go(func() error { return c.broadcaster.SendTo(node, m) }) - } - return eg.Wait() -} - // addNode adds a node to the Cluster and updates and saves the // new topology. unprotected. func (c *cluster) addNode(node *topology.Node) error { diff --git a/holder.go b/holder.go index 48ca449f1..d697b3ab4 100644 --- a/holder.go +++ b/holder.go @@ -1823,6 +1823,11 @@ type holderCleaner struct { Closing <-chan struct{} } +// TODO: this is here to satisfy the linter since holderCleaner was removed from +// the gossip implementation of removeNode. But presumably we will use it once +// we have ported over the etcd implementation. +var _ holderCleaner + // IsClosing returns true if the cleaner has been marked to close. func (c *holderCleaner) IsClosing() bool { select {