[#1173] shard: Use mode from config on reload
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 3m25s
DCO action / DCO (pull_request) Successful in 3m19s
Build / Build Components (1.22) (pull_request) Successful in 4m45s
Build / Build Components (1.21) (pull_request) Successful in 4m49s
Tests and linters / Lint (pull_request) Successful in 5m25s
Tests and linters / gopls check (pull_request) Successful in 5m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 5m42s
Tests and linters / Staticcheck (pull_request) Successful in 5m38s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m53s
Tests and linters / Tests with -race (pull_request) Successful in 10m9s
Tests and linters / Tests (1.22) (pull_request) Successful in 10m29s

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-06-18 11:11:56 +03:00
parent 11e880de7f
commit 5546ee1027
2 changed files with 1 additions and 4 deletions

View file

@ -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"

View file

@ -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() {