From eabf67a431085c9435fca9dccbe97f8a4a834ebf Mon Sep 17 00:00:00 2001 From: James Phillips Date: Fri, 29 Jul 2016 09:32:49 -0700 Subject: [PATCH] Adds more comments about the raftSafeFn. --- consul/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consul/server.go b/consul/server.go index 180defd980..03f40df56c 100644 --- a/consul/server.go +++ b/consul/server.go @@ -107,7 +107,9 @@ type Server struct { // The raft instance is used among Consul nodes within the DC to protect // operations that require strong consistency. The raftSafeFn will get // called on a graceful leave to help "safe" the state of the server so - // it won't interfere with other servers. + // it won't interfere with other servers. This will be called after Raft + // is shutdown, but before the state store is closed, so it can manipulate + // the state directly. raft *raft.Raft raftLayer *RaftLayer raftStore *raftboltdb.BoltStore