mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
do not share err variable between goroutines - it could cause panics on unwrapping
This commit is contained in:
parent
9414c5cfaa
commit
30a871b9c4
1 changed files with 2 additions and 0 deletions
|
@ -1888,6 +1888,8 @@ func processBlocks(qt *querytracer.Tracer, sns []*storageNode, denyPartialRespon
|
|||
}
|
||||
// Send the query to all the storage nodes in parallel.
|
||||
snr := startStorageNodesRequest(qt, sns, denyPartialResponse, func(qt *querytracer.Tracer, workerID uint, sn *storageNode) any {
|
||||
// Use a separate variable for each goroutine
|
||||
var err error
|
||||
res := execSearchQuery(qt, sq, func(qt *querytracer.Tracer, rd []byte, _ storage.TenantToken) any {
|
||||
sn.searchRequests.Inc()
|
||||
err = sn.processSearchQuery(qt, rd, f, workerID, deadline)
|
||||
|
|
Loading…
Reference in a new issue