Skip to content

Commit

Permalink
Fixed issue where distributed warp hangs at end
Browse files Browse the repository at this point in the history
When running distributed warp with influxdb, the app would always
hang at the end of each run. This is because the channel used
to send operations to Influx isn't used on the initiator process
and thus, never gets closed. The app then hangs on the global
wait group for the influx goroutine to complete.
  • Loading branch information
jasoncwik committed Oct 3, 2024
1 parent 98c37ba commit 3046b6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ func runBench(ctx *cli.Context, b bench.Benchmark) error {
b.GetCommon().ClientIdx = ab.clientIdx
return runClientBenchmark(ctx, b, ab)
}

if done, err := runServerBenchmark(ctx, b); done || err != nil {
// Close all extra output channels so the benchmark will terminate
for _, out := range b.GetCommon().ExtraOut {
close(out)
}
fatalIf(probe.NewError(err), "Error running remote benchmark")
return nil
}
Expand Down

0 comments on commit 3046b6a

Please sign in to comment.