[#901] engine: release shard pools in Close

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-19 16:10:55 +03:00 committed by Alex Vanin
parent 0beaed2ef4
commit 10afd26354

View file

@ -39,6 +39,10 @@ func (e *StorageEngine) Close() error {
e.mtx.RLock()
defer e.mtx.RUnlock()
for _, p := range e.shardPools {
p.Release()
}
for id, sh := range e.shards {
if err := sh.Close(); err != nil {
e.log.Debug("could not close shard",