mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
linter fixes
This commit is contained in:
parent
f9661b7b81
commit
da804ee6d5
2 changed files with 7 additions and 21 deletions
23
cluster.go
23
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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue