forked from TrueCloudLab/frostfs-node
[#453] engine: Set Disabled mode to deleted shard
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
50caa388b0
commit
01a0c97760
9 changed files with 42 additions and 5 deletions
|
@ -203,7 +203,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(logs.EngineCouldNotChangeShardModeToDisabled,
|
||||
zap.Stringer("id", sh.ID()),
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
err = sh.Close()
|
||||
if err != nil {
|
||||
e.log.Error(logs.EngineCouldNotCloseRemovedShard,
|
||||
zap.Stringer("id", sh.ID()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue