diff --git a/store/store.go b/store/store.go index 9aa1a777..6d0ca2ec 100644 --- a/store/store.go +++ b/store/store.go @@ -1177,7 +1177,8 @@ func (s *Store) Request(eqr *proto.ExecuteQueryRequest) ([]*proto.ExecuteQueryRe } if eqr.Level == proto.QueryRequest_QUERY_REQUEST_LEVEL_NONE { - if eqr.Freshness > 0 && time.Since(s.raft.LastContact()).Nanoseconds() > eqr.Freshness { + if s.raft.State() != raft.Leader && eqr.Freshness > 0 && + time.Since(s.raft.LastContact()).Nanoseconds() > eqr.Freshness { return nil, ErrStaleRead } qr, err := s.db.Query(eqr.Request, eqr.Timings)