From a62dcc9bfec356bf9b861b94e4c7c402ab53dfef Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Fri, 23 Oct 2020 17:39:55 -0400 Subject: [PATCH] health: use streaming, even when cache=1 is not set --- agent/health_endpoint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/health_endpoint.go b/agent/health_endpoint.go index af935f1ba8..2f50147ee3 100644 --- a/agent/health_endpoint.go +++ b/agent/health_endpoint.go @@ -219,8 +219,8 @@ func (s *HTTPHandlers) healthServiceNodes(resp http.ResponseWriter, req *http.Re return nil, nil } - // TODO: handle this for all endpoints in parseConsistency - args.QueryOptions.UseCache = s.agent.config.HTTPUseCache && args.QueryOptions.UseCache + useStreaming := s.agent.config.CacheUseStreamingBackend && args.MinQueryIndex > 0 + args.QueryOptions.UseCache = s.agent.config.HTTPUseCache && (args.QueryOptions.UseCache || useStreaming) out, md, err := s.agent.rpcClientHealth.ServiceNodes(req.Context(), args) if err != nil {