Skip to content

Commit

Permalink
Merge pull request etcd-io#16460 from geetasg/pr10
Browse files Browse the repository at this point in the history
Preserve the order of steps done for snapshot
  • Loading branch information
ahrtr committed Aug 23, 2023
2 parents 29bfdd1 + 8729417 commit e44afcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,7 @@ func (s *EtcdServer) applyConfChange(cc raftpb.ConfChange, confState *raftpb.Con

// TODO: non-blocking snapshot
func (s *EtcdServer) snapshot(snapi uint64, confState raftpb.ConfState) {
d := GetMembershipInfoInV2Format(s.Logger(), s.cluster)
// commit kv to write metadata (for example: consistent index) to disk.
//
// This guarantees that Backend's consistent_index is >= index of last snapshot.
Expand All @@ -2074,7 +2075,6 @@ func (s *EtcdServer) snapshot(snapi uint64, confState raftpb.ConfState) {
// So KV().Commit() cannot run in parallel with toApply. It has to be called outside
// the go routine created below.
s.KV().Commit()
d := GetMembershipInfoInV2Format(s.Logger(), s.cluster)

s.GoAttach(func() {
lg := s.Logger()
Expand Down

0 comments on commit e44afcf

Please sign in to comment.