forked from TrueCloudLab/frostfs-node
[TrueCloudLab/hrw#2] node: Optimize shard hash
Compute shard hash only once Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
a1ab25b33e
commit
c3a7039801
3 changed files with 21 additions and 13 deletions
|
@ -19,7 +19,7 @@ type StorageEngine struct {
|
|||
|
||||
mtx *sync.RWMutex
|
||||
|
||||
shards map[string]shardWrapper
|
||||
shards map[string]hashedShard
|
||||
|
||||
shardPools map[string]util.WorkerPool
|
||||
|
||||
|
@ -223,7 +223,7 @@ func New(opts ...Option) *StorageEngine {
|
|||
return &StorageEngine{
|
||||
cfg: c,
|
||||
mtx: new(sync.RWMutex),
|
||||
shards: make(map[string]shardWrapper),
|
||||
shards: make(map[string]hashedShard),
|
||||
shardPools: make(map[string]util.WorkerPool),
|
||||
closeCh: make(chan struct{}),
|
||||
setModeCh: make(chan setModeRequest),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue