Skip to content

Commit

Permalink
Fix hang at end of distributed warp with influxdb (#340)
Browse files Browse the repository at this point in the history
Fixed issue where distributed warp hangs at end

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 authored Oct 16, 2024
1 parent 98c37ba commit d0b3d3a
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 d0b3d3a

Please sign in to comment.