-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[aggregator] Update flush times after each flush #3890
Conversation
Previously flushed times were only updated after a delay; in practice this appears to be needlessly defensive and impacts metric forwarding times by up to `mgr.flushTimesPersistEvery`, which defaults to 10s; with the tight timings involved in aggregator forwarding, this delay would contribute to dropped metrics on aggregator deploys
Tabling this one for now until I can verify the improvements (since the test work may be quite messy here) |
require.Nil(t, flushTask) | ||
require.Equal(t, 900*time.Millisecond, dur) | ||
require.Equal(t, 0, storeAsyncCount) | ||
} | ||
|
||
func TestLeaderFlushManagerPrepareNoFlushWithPersistOnce(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these tests were batching up persists until a particular timing was hit; now that persists are refactored to run independently of a Run, they are not necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-added after bringing back the flushTimesPersistEvery option
Codecov Report
@@ Coverage Diff @@
## master #3890 +/- ##
======================================
Coverage 57.1% 57.1%
======================================
Files 553 553
Lines 63881 63881
======================================
Hits 36537 36537
Misses 24148 24148
Partials 3196 3196
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
||
closeLogger.Info("done") | ||
return nil | ||
// NB: closing the flush manager is the only really necessary step for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice comment!
Previously flushed times were only updated after a delay; in practice
this appears to be needlessly defensive and impacts metric forwarding
times by up to
mgr.flushTimesPersistEvery
, which defaults to 10s; withthe tight timings involved in aggregator forwarding, this delay would
contribute to dropped metrics on aggregator deploys
Also adds an eager shutdown that waits only for the flush time update
before allowing the aggregator to shutdown, since this is the most imporant
step of the graceful shutdown period as is.