mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: Cluster.IsIDremoved -> Cluster.IsIDRemoved
This commit is contained in:
parent
d47de988e4
commit
4d80f01201
@ -153,7 +153,7 @@ func (c Cluster) MemberIDs() []uint64 {
|
|||||||
return ids
|
return ids
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cluster) IsIDremoved(id uint64) bool {
|
func (c *Cluster) IsIDRemoved(id uint64) bool {
|
||||||
return c.removed[id]
|
return c.removed[id]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -266,7 +266,7 @@ func (s *EtcdServer) start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *EtcdServer) Process(ctx context.Context, m raftpb.Message) error {
|
func (s *EtcdServer) Process(ctx context.Context, m raftpb.Message) error {
|
||||||
if s.Cluster.IsIDremoved(m.From) {
|
if s.Cluster.IsIDRemoved(m.From) {
|
||||||
return ErrRemoved
|
return ErrRemoved
|
||||||
}
|
}
|
||||||
return s.node.Step(ctx, m)
|
return s.node.Step(ctx, m)
|
||||||
@ -612,7 +612,7 @@ func (s *EtcdServer) applyConfChange(cc raftpb.ConfChange, nodes []uint64) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *EtcdServer) checkConfChange(cc raftpb.ConfChange, nodes []uint64) error {
|
func (s *EtcdServer) checkConfChange(cc raftpb.ConfChange, nodes []uint64) error {
|
||||||
if s.Cluster.IsIDremoved(cc.NodeID) {
|
if s.Cluster.IsIDRemoved(cc.NodeID) {
|
||||||
return ErrIDRemoved
|
return ErrIDRemoved
|
||||||
}
|
}
|
||||||
switch cc.Type {
|
switch cc.Type {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user