[#411] Remove unnecessary pointers for sync objects

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-05-30 10:14:37 +03:00 committed by Evgenii Stratonikov
parent f934abed8f
commit faca861451
20 changed files with 39 additions and 64 deletions

View file

@ -20,7 +20,7 @@ type StorageEngine struct {
removeDuplicatesInProgress atomic.Bool
mtx *sync.RWMutex
mtx sync.RWMutex
shards map[string]hashedShard
@ -225,15 +225,12 @@ func New(opts ...Option) *StorageEngine {
}
return &StorageEngine{
cfg: c,
mtx: new(sync.RWMutex),
shards: make(map[string]hashedShard),
shardPools: make(map[string]util.WorkerPool),
closeCh: make(chan struct{}),
setModeCh: make(chan setModeRequest),
evacuateLimiter: &evacuationLimiter{
guard: &sync.RWMutex{},
},
cfg: c,
shards: make(map[string]hashedShard),
shardPools: make(map[string]util.WorkerPool),
closeCh: make(chan struct{}),
setModeCh: make(chan setModeRequest),
evacuateLimiter: &evacuationLimiter{},
}
}