Adds more comments about the raftSafeFn.

This commit is contained in:
James Phillips 2016-07-29 09:32:49 -07:00 committed by James Phillips
parent e3a01d9b7f
commit eabf67a431
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 3 additions and 1 deletions

View File

@ -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