From 54d2f679246729990146c7868ae0a4a6c7ae2ecd Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 11 Feb 2021 12:37:19 +0200 Subject: [PATCH] app/vmselect/promql: properly make copies of EvalConfig --- app/vmselect/promql/eval.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index 9768ddfae..fc45596bb 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -295,8 +295,8 @@ func evalExpr(ec *EvalConfig, e metricsql.Expr) ([]*timeseries, error) { wg.Add(1) go func() { defer wg.Done() - ecCopy := *ec - tss, err := evalExpr(&ecCopy, be.Left) + ecCopy := newEvalConfig(ec) + tss, err := evalExpr(ecCopy, be.Left) mu.Lock() if err != nil { if errGlobal == nil { @@ -309,8 +309,8 @@ func evalExpr(ec *EvalConfig, e metricsql.Expr) ([]*timeseries, error) { wg.Add(1) go func() { defer wg.Done() - ecCopy := *ec - tss, err := evalExpr(&ecCopy, be.Right) + ecCopy := newEvalConfig(ec) + tss, err := evalExpr(ecCopy, be.Right) mu.Lock() if err != nil { if errGlobal == nil {