mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
remove some dead code related to coordinator
This commit is contained in:
parent
c45e21640c
commit
4c1d94da14
3 changed files with 0 additions and 28 deletions
|
|
@ -64,8 +64,6 @@ const (
|
|||
messageTypeClusterStatus
|
||||
messageTypeResizeInstruction
|
||||
messageTypeResizeInstructionComplete
|
||||
messageTypeSetCoordinator
|
||||
messageTypeUpdateCoordinator
|
||||
messageTypeNodeState
|
||||
messageTypeRecalculateCaches
|
||||
messageTypeNodeEvent
|
||||
|
|
|
|||
17
cluster.go
17
cluster.go
|
|
@ -214,23 +214,6 @@ func (c *cluster) unprotectedIsCoordinator() bool {
|
|||
return snap.PrimaryFieldTranslationNode().ID == c.Node.ID
|
||||
}
|
||||
|
||||
// setCoordinator tells the current node to become the
|
||||
// Coordinator. In response to this, the current node
|
||||
// will consider itself coordinator and update the other
|
||||
// nodes with its version of Cluster.Status.
|
||||
func (c *cluster) setCoordinator(n *topology.Node) error {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
// Verify that the new Coordinator value matches
|
||||
// this node.
|
||||
if c.Node.ID != n.ID {
|
||||
return fmt.Errorf("coordinator node does not match this node")
|
||||
}
|
||||
|
||||
// Broadcast cluster status.
|
||||
return c.unprotectedSendSync(c.unprotectedStatus())
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -2028,15 +2028,6 @@ func parseUint64Slice(s string) ([]uint64, error) {
|
|||
return a, nil
|
||||
}
|
||||
|
||||
type setCoordinatorRequest struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
type setCoordinatorResponse struct {
|
||||
Old *topology.Node `json:"old"`
|
||||
New *topology.Node `json:"new"`
|
||||
}
|
||||
|
||||
// handlePostClusterResizeRemoveNode handles POST /cluster/resize/remove-node request.
|
||||
func (h *Handler) handlePostClusterResizeRemoveNode(w http.ResponseWriter, r *http.Request) {
|
||||
if !validHeaderAcceptJSON(r.Header) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue