diff --git a/pkg/local_object_storage/shard/control.go b/pkg/local_object_storage/shard/control.go index c48275e0..30b227b2 100644 --- a/pkg/local_object_storage/shard/control.go +++ b/pkg/local_object_storage/shard/control.go @@ -135,7 +135,7 @@ func (s *Shard) Init() error { s.updateObjectCounter() s.gc = &gc{ - gcCfg: s.gcCfg, + gcCfg: &s.gcCfg, remover: s.removeGarbage, stopChannel: make(chan struct{}), eventChan: make(chan Event), diff --git a/pkg/local_object_storage/shard/gc.go b/pkg/local_object_storage/shard/gc.go index 04f72a97..75db47cf 100644 --- a/pkg/local_object_storage/shard/gc.go +++ b/pkg/local_object_storage/shard/gc.go @@ -82,8 +82,8 @@ type gcCfg struct { workerPoolInit func(int) util.WorkerPool } -func defaultGCCfg() *gcCfg { - return &gcCfg{ +func defaultGCCfg() gcCfg { + return gcCfg{ removerInterval: 10 * time.Second, log: &logger.Logger{Logger: zap.L()}, workerPoolInit: func(int) util.WorkerPool { diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index ad785237..d3641600 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -85,7 +85,7 @@ type cfg struct { log *logger.Logger - gcCfg *gcCfg + gcCfg gcCfg expiredTombstonesCallback ExpiredTombstonesCallback