diff --git a/satellite/metabase/rangedloop/service.go b/satellite/metabase/rangedloop/service.go index b6834260f..3a4b96b60 100644 --- a/satellite/metabase/rangedloop/service.go +++ b/satellite/metabase/rangedloop/service.go @@ -30,7 +30,7 @@ type Config struct { Parallelism int `help:"how many chunks of segments to process in parallel" default:"2"` BatchSize int `help:"how many items to query in a batch" default:"2500"` AsOfSystemInterval time.Duration `help:"as of system interval" releaseDefault:"-5m" devDefault:"-1us" testDefault:"-1us"` - Interval time.Duration `help:"how often to run the loop" releaseDefault:"2h" devDefault:"10s" testDefault:"10s"` + Interval time.Duration `help:"how often to run the loop" releaseDefault:"2h" devDefault:"10s" testDefault:"0"` SuspiciousProcessedRatio float64 `help:"ratio where to consider processed count as supicious" default:"0.03"` } @@ -93,6 +93,10 @@ func (service *Service) Close() error { func (service *Service) Run(ctx context.Context) (err error) { defer mon.Task()(&ctx)(&err) + if service.config.Interval == 0 { + return nil + } + service.log.Info("ranged loop initialized") return service.Loop.Run(ctx, func(ctx context.Context) error { diff --git a/satellite/repair/checker/observer_test.go b/satellite/repair/checker/observer_test.go index e834de9d5..1e024ba2b 100644 --- a/satellite/repair/checker/observer_test.go +++ b/satellite/repair/checker/observer_test.go @@ -590,7 +590,12 @@ func TestObserver_PlacementCheck(t *testing.T) { testplanet.Run(t, testplanet.Config{ SatelliteCount: 1, StorageNodeCount: 4, UplinkCount: 1, Reconfigure: testplanet.Reconfigure{ - Satellite: testplanet.ReconfigureRS(1, 2, 4, 4), + Satellite: testplanet.Combine( + testplanet.ReconfigureRS(1, 2, 4, 4), + func(log *zap.Logger, index int, config *satellite.Config) { + config.RangedLoop.Interval = 10 * time.Second + }, + ), }, }, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) { planet.Satellites[0].RangedLoop.RangedLoop.Service.Loop.Pause()