app/vmselect/promql: properly make copies of EvalConfig

This commit is contained in:
Aliaksandr Valialkin 2021-02-11 12:37:19 +02:00
parent 5973fd4067
commit 54d2f67924

View file

@ -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 {