gc-bf: add live count observer to loop
To live count observer is emitting metric with number of segments already processed. It's handy to see current progress. Change-Id: Id6766b5ec9b05bce8f6376e9afcae91fcf7df6fd
This commit is contained in:
parent
33fe731620
commit
bec981aa7a
@ -104,7 +104,10 @@ func NewGarbageCollectionBF(log *zap.Logger, db DB, metabaseDB *metabase.DB, rev
|
||||
}
|
||||
|
||||
provider := rangedloop.NewMetabaseRangeSplitter(metabaseDB, config.RangedLoop.AsOfSystemInterval, config.RangedLoop.BatchSize)
|
||||
peer.RangedLoop.Service = rangedloop.NewService(log.Named("rangedloop"), config.RangedLoop, provider, []rangedloop.Observer{observer})
|
||||
peer.RangedLoop.Service = rangedloop.NewService(log.Named("rangedloop"), config.RangedLoop, provider, []rangedloop.Observer{
|
||||
rangedloop.NewLiveCountObserver(metabaseDB, config.RangedLoop.SuspiciousProcessedRatio, config.RangedLoop.AsOfSystemInterval),
|
||||
observer,
|
||||
})
|
||||
|
||||
if !config.GarbageCollectionBF.RunOnce {
|
||||
peer.Services.Add(lifecycle.Item{
|
||||
|
Loading…
Reference in New Issue
Block a user