[#1770] node: Do not lock on shard's Close call

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-30 17:01:48 +03:00 committed by fyrchik
parent ab3ef7110e
commit 8ebe95747e
3 changed files with 21 additions and 15 deletions

View file

@ -263,10 +263,7 @@ func (e *StorageEngine) Reload(rcfg ReConfiguration) error {
e.mtx.RUnlock()
err := e.removeShards(shardsToRemove...)
if err != nil {
return fmt.Errorf("could not remove shards: %w", err)
}
e.removeShards(shardsToRemove...)
for _, newPath := range shardsToAdd {
sh, err := e.createShard(rcfg.shards[newPath])