code: func (s *Server) consistentRead() error {
  	defer metrics.MeasureSince([]string{"rpc", "consistentRead"}, time.Now())
  	future := s.raft.VerifyLeader()
  	if err := future.Error(); err != nil {
  		return err //fail fast if leader verification fails
  	}
  	// poll consistent read readiness, wait for up to RPCHoldTimeout milliseconds
  	if s.isReadyForConsistentReads() {
  		return nil
  	}
  	jitter := lib.RandomStagger(s.config.RPCHoldTimeout / jitterFraction)
  	deadline := time.Now().Add(s.config.RPCHoldTimeout)
  
  	for time.Now().Before(deadline) {
  
  		select {
  		case <-time.After(jitter):
  			// Drop through and check before we loop again.
  
  		case <-s.shutdownCh:
  			return fmt.Errorf("shutdown waiting for leader")
  		}
  
  		if s.isReadyForConsistentReads() {
  			return nil
  		}
  	}
  
  	return structs.ErrNotReadyForConsistentReads
  }
docs: // consistentRead is used to ensure we do not perform a stale
  // read. This is done by verifying leadership before the read.