Skip to content

Commit

Permalink
satellite/metabase/segmentloop: add missing monitoring
Browse files Browse the repository at this point in the history
Currently we are tracking loop time with RunOnce method
metrics but it may give inaccurate values if loop if waiting
for observer for a ver long time. We had such case with GC
which is only loop observer in GC peer and its joning loop
every 5 days.

Change-Id: I08546c912e00c3641488de6a5d75948fe75c8e99
  • Loading branch information
mniewrzal committed Aug 26, 2022
1 parent 7e71986 commit 2163d60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions satellite/metabase/segmentloop/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ func (loop *Service) Wait() {
var errNoObservers = errs.New("no observers")

func (loop *Service) iterateDatabase(ctx context.Context, observers []*observerContext) (err error) {
defer mon.Task()(&ctx)(&err)

defer func() {
if err != nil {
errorObservers(observers, err)
Expand Down

1 comment on commit 2163d60

@storjrobot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Storj Community Forum (official). There might be relevant details there:

https://forum.storj.io/t/release-preparation-v1-63/19558/1

Please sign in to comment.