diff --git a/pkg/local_object_storage/engine/evacuate.go b/pkg/local_object_storage/engine/evacuate.go index 49df6fdf..abe43927 100644 --- a/pkg/local_object_storage/engine/evacuate.go +++ b/pkg/local_object_storage/engine/evacuate.go @@ -82,6 +82,8 @@ func (e *StorageEngine) Evacuate(prm EvacuateShardPrm) (EvacuateShardRes, error) return EvacuateShardRes{}, errMustHaveTwoShards } + e.log.Info("started shards evacuation", zap.Strings("shard_ids", sidList)) + // We must have all shards, to have correct information about their // indexes in a sorted slice and set appropriate marks in the metabase. // Evacuated shard is skipped during put. @@ -185,5 +187,7 @@ mainLoop: } } + e.log.Info("finished shards evacuation", + zap.Strings("shard_ids", sidList)) return res, nil } diff --git a/pkg/local_object_storage/shard/mode.go b/pkg/local_object_storage/shard/mode.go index 4f451363..0ca2609f 100644 --- a/pkg/local_object_storage/shard/mode.go +++ b/pkg/local_object_storage/shard/mode.go @@ -3,6 +3,7 @@ package shard import ( "github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode" "github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/util/logicerr" + "go.uber.org/zap" ) // ErrReadOnlyMode is returned when it is impossible to apply operation @@ -24,6 +25,10 @@ func (s *Shard) SetMode(m mode.Mode) error { } func (s *Shard) setMode(m mode.Mode) error { + s.log.Info("setting shard mode", + zap.Stringer("old_mode", s.info.Mode), + zap.Stringer("new_mode", m)) + components := []interface{ SetMode(mode.Mode) error }{ s.metaBase, s.blobStor, } @@ -61,6 +66,8 @@ func (s *Shard) setMode(m mode.Mode) error { s.metricsWriter.SetReadonly(s.info.Mode != mode.ReadWrite) } + s.log.Info("shard mode set successfully", + zap.Stringer("mode", s.info.Mode)) return nil }