forked from TrueCloudLab/frostfs-node
[#1173] shard: Use mode
from config on reload
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
11e880de7f
commit
5546ee1027
2 changed files with 1 additions and 4 deletions
|
@ -247,7 +247,6 @@ const (
|
||||||
ShardCouldNotCloseShardComponent = "could not close shard component"
|
ShardCouldNotCloseShardComponent = "could not close shard component"
|
||||||
ShardCantOpenMetabaseMoveToADegradedMode = "can't open metabase, move to a degraded mode"
|
ShardCantOpenMetabaseMoveToADegradedMode = "can't open metabase, move to a degraded mode"
|
||||||
ShardCantInitializeMetabaseMoveToADegradedreadonlyMode = "can't initialize metabase, move to a degraded-read-only mode"
|
ShardCantInitializeMetabaseMoveToADegradedreadonlyMode = "can't initialize metabase, move to a degraded-read-only mode"
|
||||||
ShardTryingToRestoreReadwriteMode = "trying to restore read-write mode"
|
|
||||||
ShardStopEventListenerByClosedEventChannel = "stop event listener by closed `event` channel"
|
ShardStopEventListenerByClosedEventChannel = "stop event listener by closed `event` channel"
|
||||||
ShardStopEventListenerByClosedStopChannel = "stop event listener by closed `stop` channel"
|
ShardStopEventListenerByClosedStopChannel = "stop event listener by closed `stop` channel"
|
||||||
ShardStopEventListenerByContext = "stop event listener by context"
|
ShardStopEventListenerByContext = "stop event listener by context"
|
||||||
|
|
|
@ -418,9 +418,7 @@ func (s *Shard) Reload(ctx context.Context, opts ...Option) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return s.setMode(c.info.Mode)
|
||||||
s.log.Info(logs.ShardTryingToRestoreReadwriteMode)
|
|
||||||
return s.setMode(mode.ReadWrite)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Shard) lockExclusive() func() {
|
func (s *Shard) lockExclusive() func() {
|
||||||
|
|
Loading…
Reference in a new issue