mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Preserve the order of steps done for snapshot
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
This commit is contained in:
parent
5a54fe6dd1
commit
8729417cee
@ -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.
|
||||
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user