From 5546ee102731f8110bd29e5b0a08e7703c734622 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Tue, 18 Jun 2024 11:11:56 +0300 Subject: [PATCH] [#1173] shard: Use `mode` from config on `reload` Signed-off-by: Anton Nikiforov --- internal/logs/logs.go | 1 - pkg/local_object_storage/shard/control.go | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/logs/logs.go b/internal/logs/logs.go index eeb2fbf3f..78f00c4ee 100644 --- a/internal/logs/logs.go +++ b/internal/logs/logs.go @@ -247,7 +247,6 @@ const ( ShardCouldNotCloseShardComponent = "could not close shard component" ShardCantOpenMetabaseMoveToADegradedMode = "can't open metabase, move to a degraded 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" ShardStopEventListenerByClosedStopChannel = "stop event listener by closed `stop` channel" ShardStopEventListenerByContext = "stop event listener by context" diff --git a/pkg/local_object_storage/shard/control.go b/pkg/local_object_storage/shard/control.go index 38a29cb12..90d7afdd4 100644 --- a/pkg/local_object_storage/shard/control.go +++ b/pkg/local_object_storage/shard/control.go @@ -418,9 +418,7 @@ func (s *Shard) Reload(ctx context.Context, opts ...Option) error { return err } } - - s.log.Info(logs.ShardTryingToRestoreReadwriteMode) - return s.setMode(mode.ReadWrite) + return s.setMode(c.info.Mode) } func (s *Shard) lockExclusive() func() { -- 2.45.2