forked from TrueCloudLab/frostfs-node
[#845] object/put: Separate pools for local and remote operations
In previous implementation Object PUT used single pool of workers for local and remote ops, but these ops are heterogeneous. Use remote/local pool for remote/local operations in PUT service. At first the pools are configured with the same size. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3b2b6007c6
commit
ee20200c2e
5 changed files with 25 additions and 10 deletions
|
@ -44,7 +44,7 @@ type cfg struct {
|
|||
|
||||
netMapSrc netmap.Source
|
||||
|
||||
workerPool util.WorkerPool
|
||||
remotePool, localPool util.WorkerPool
|
||||
|
||||
netmapKeys netmap.AnnouncedKeys
|
||||
|
||||
|
@ -61,7 +61,8 @@ type cfg struct {
|
|||
|
||||
func defaultCfg() *cfg {
|
||||
return &cfg{
|
||||
workerPool: new(util.SyncWorkerPool),
|
||||
remotePool: new(util.SyncWorkerPool),
|
||||
localPool: new(util.SyncWorkerPool),
|
||||
log: zap.L(),
|
||||
}
|
||||
}
|
||||
|
@ -117,9 +118,9 @@ func WithNetworkMapSource(v netmap.Source) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithWorkerPool(v util.WorkerPool) Option {
|
||||
func WithWorkerPools(remote, local util.WorkerPool) Option {
|
||||
return func(c *cfg) {
|
||||
c.workerPool = v
|
||||
c.remotePool, c.localPool = remote, local
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue