[#452] engine: Set Disabled mode to deleted shard
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
0252875aec
commit
1cae03c47c
10 changed files with 46 additions and 7 deletions
|
@ -174,7 +174,14 @@ func (e *StorageEngine) removeShards(ids ...string) {
|
|||
e.mtx.Unlock()
|
||||
|
||||
for _, sh := range ss {
|
||||
err := sh.Close()
|
||||
err := sh.SetMode(mode.Disabled)
|
||||
if err != nil {
|
||||
e.log.Error("could not change shard mode to disabled",
|
||||
zap.Stringer("id", sh.ID()),
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
err = sh.Close()
|
||||
if err != nil {
|
||||
e.log.Error("could not close removed shard",
|
||||
zap.Stringer("id", sh.ID()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue