From 14e242d0b90582025d56f771197f0e1e7b18162b Mon Sep 17 00:00:00 2001 From: Haleygo Date: Sat, 8 Jul 2023 14:21:27 +0800 Subject: [PATCH] vmselect: fix result collect count (#4599) --- app/vmselect/netstorage/netstorage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/netstorage/netstorage.go b/app/vmselect/netstorage/netstorage.go index d47adf5329..5efd9e407e 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -1729,7 +1729,6 @@ func (snr *storageNodesRequest) collectResults(partialResultsCounter *metrics.Co result := <-snr.resultsCh if err := f(result.data); err != nil { snr.finishQueryTracer(result.qt, fmt.Sprintf("error: %s", err)) - resultsCollected++ if *skipSlowReplicas && resultsCollected > len(sns)-*replicationFactor { // There is no need in waiting for the remaining results, // because the collected results contain all the data according to the given -replicationFactor. @@ -1767,6 +1766,7 @@ func (snr *storageNodesRequest) collectResults(partialResultsCounter *metrics.Co continue } snr.finishQueryTracer(result.qt, "") + resultsCollected++ } if len(errsPartial) < *replicationFactor { // Assume that the result is full if the the number of failing vmstorage nodes