From 127a960a548e64734b33b18c9368a10e15c06bff Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Sun, 31 May 2020 21:19:33 -0400 Subject: [PATCH] clarify rpc consistency readiness comment --- nomad/leader.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nomad/leader.go b/nomad/leader.go index cbf8216c83ba..26b81871fea8 100644 --- a/nomad/leader.go +++ b/nomad/leader.go @@ -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