Skip to content

Commit 87f5cb2

Browse files
committedMar 10, 2025
Only do the verification when v2store has caught with v3store
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
1 parent b574c6d commit 87f5cb2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎server/etcdserver/server.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -2452,16 +2452,21 @@ func (s *EtcdServer) applyConfChange(cc raftpb.ConfChange, confState *raftpb.Con
24522452
}
24532453
}
24542454

2455-
s.verifyV3StoreInSyncWithV2Store()
2455+
s.verifyV3StoreInSyncWithV2Store(shouldApplyV3)
24562456

24572457
return false, nil
24582458
}
24592459

2460-
func (s *EtcdServer) verifyV3StoreInSyncWithV2Store() {
2460+
func (s *EtcdServer) verifyV3StoreInSyncWithV2Store(shouldApplyV3 membership.ShouldApplyV3) {
24612461
if !verify.VerifyEnabled() {
24622462
return
24632463
}
24642464

2465+
// If shouldApplyV3 == false, then it means v2store hasn't caught up with v3store.
2466+
if !shouldApplyV3 {
2467+
return
2468+
}
2469+
24652470
v2Members, v2RemovedMembers := s.cluster.MembersFromStore()
24662471
v3Members, v3RemovedMembers := s.cluster.MembersFromBackend()
24672472

0 commit comments

Comments
 (0)