Skip to content

Commit

Permalink
clarify rpc consistency readiness comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed Jun 1, 2020
1 parent e9d14a3 commit 127a960
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nomad/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ func (s *Server) establishLeadership(stopCh chan struct{}) error {
// Enable the periodic dispatcher, since we are now the leader.
s.periodicDispatcher.SetEnabled(true)

// Activate RPCs after all leadership components are enabled
// and the server can handle write RPCs
// Activate RPC now that local FSM caught up with Raft (as evident by Barrier call success)
// and all leader related components (e.g. broker queue) are enabled.
// Auxiliary processes (e.g. background, bookkeeping, and cleanup tasks can start after)
s.setConsistentReadReady()

// Further clean ups and follow up that don't block RPC consistency
Expand Down

0 comments on commit 127a960

Please sign in to comment.