Skip to content

Commit

Permalink
do not call ApplyConfChange when validation failed
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Wang <[email protected]>
  • Loading branch information
ahrtr committed Nov 26, 2023
1 parent 9881db0 commit d3b20d2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,6 @@ func removeNeedlessRangeReqs(txn *pb.TxnRequest) {
func (s *EtcdServer) applyConfChange(cc raftpb.ConfChange, confState *raftpb.ConfState, shouldApplyV3 membership.ShouldApplyV3) (bool, error) {
if err := s.cluster.ValidateConfigurationChange(cc, shouldApplyV3); err != nil {
cc.NodeID = raft.None
s.r.ApplyConfChange(cc)

// The txPostLock callback will not get called in this case,
// so we should set the consistent index directly.
Expand Down

0 comments on commit d3b20d2

Please sign in to comment.