Skip to content

Commit

Permalink
Pass instrument.Options to PooledWorkerPool
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrobb committed Dec 5, 2019
1 parent 42d1168 commit c9a6a56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dbnode/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,10 @@ func (c Configuration) NewAdminClient(
size = *c.AsyncWriteWorkerPoolSize
}

workerPoolInstrumentOpts := iopts.SetMetricsScope(writeRequestScope)
workerPoolOpts := xsync.NewPooledWorkerPoolOptions().
SetGrowOnDemand(true)
SetGrowOnDemand(true).
SetInstrumentOptions(workerPoolInstrumentOpts)
workerPool, err := xsync.NewPooledWorkerPool(size, workerPoolOpts)
if err != nil {
return nil, fmt.Errorf("unable to create async worker pool: %v", err)
Expand Down

0 comments on commit c9a6a56

Please sign in to comment.