MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / RemoveNode

Method RemoveNode

store/engine/raft/node_test.go:90–103  ·  view source on GitHub ↗
(ctx context.Context, nodeID uint64)

Source from the content-addressed store, hash-verified

88}
89
90func (c *TestCluster) RemoveNode(ctx context.Context, nodeID uint64) error {
91 var node *Node
92 for i, n := range c.nodes {
93 if n.config.ID == nodeID {
94 node = n
95 c.nodes = append(c.nodes[:i], c.nodes[i+1:]...)
96 break
97 }
98 }
99 if len(c.nodes) == 0 || node == nil {
100 return nil
101 }
102 return node.RemovePeer(ctx, nodeID)
103}
104
105func (c *TestCluster) SetSnapshotThreshold(threshold uint64) {
106 for _, n := range c.nodes {

Callers 1

Calls 1

RemovePeerMethod · 0.95

Tested by

no test coverage detected