Skip to content

Commit

Permalink
fix(repl): repl uses unique planner node ids (#5022)
Browse files Browse the repository at this point in the history
  • Loading branch information
scbrickley authored Jul 25, 2022
1 parent 05a1065 commit cad109b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion repl/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/influxdata/flux/lang"
"github.com/influxdata/flux/libflux/go/libflux"
"github.com/influxdata/flux/memory"
"github.com/influxdata/flux/plan"
"github.com/influxdata/flux/runtime"
"github.com/influxdata/flux/semantic"
"github.com/influxdata/flux/values"
Expand Down Expand Up @@ -241,7 +242,10 @@ func (r *REPL) analyzeLine(t string) (*semantic.Package, *libflux.FluxError, err

func (r *REPL) doQuery(ctx context.Context, spec *flux.Spec) error {
// Setup cancel context
ctx, cancelFunc := context.WithCancel(ctx)
nextPlanNodeID := new(int)
ctx, cancelFunc := context.WithCancel(context.WithValue(
ctx, plan.NextPlanNodeIDKey, nextPlanNodeID,
))
r.setCancel(cancelFunc)
defer cancelFunc()
defer r.clearCancel()
Expand Down

0 comments on commit cad109b

Please sign in to comment.