-
Notifications
You must be signed in to change notification settings - Fork 512
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
TestIngester_PushToStorage_CircuitBreaker: increase initial delay #9351
base: main
Are you sure you want to change the base?
TestIngester_PushToStorage_CircuitBreaker: increase initial delay #9351
Conversation
Fixes XXX I believe there's a race between sending the first request and then collecting the metrics. It's possible that we collect the metrics longer than 200ms after the first request, at which point the CB has opened. I could reproduce XXX by reducing the initialDelay to 10ms. This PR increases it to 1 hour so that we're more sure that the delay hasn't expired when we're collecting the metrics. Signed-off-by: Dimitar Dimitrov <[email protected]>
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.
Works for me. Although, I still don't fully understand what does the case of initialDelayEnabled
tests.
Note also the comment about another one to update.
if initialDelayEnabled { | ||
initialDelay = 200 * time.Millisecond | ||
initialDelay = time.Hour | ||
} |
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.
There is also TestIngester_Push_CircuitBreaker_DeadlineExceeded
down there, which uses the same test pattern, where initialDelay = 200 * time.Millisecond
. Should we, maybe, update it also, to keep the tests consistent. Otherwise, it makes it even more complicated to follow what those tests are actually testing.
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.
yeah probably. I think one uses ingest storage, the other one doesn'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.
pushed this a299bcd
I think it basically checks that the CB doesn't open for the first N seconds after a failure. If I was writing it, I'd probably then assert that the CB does open eventually; right now we just assert it stays closed |
Signed-off-by: Dimitar Dimitrov <[email protected]>
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.
It's even better now 🔥🔥
What this PR does
I believe there's a race between sending the first request and then collecting the metrics. It's possible that we collect the metrics longer than 200ms after the first request, at which point the CB has opened. I could reproduce #9052 by reducing the initialDelay to 10ms.
This PR increases it to 1 hour so that we're more sure that the delay hasn't expired when we're collecting the metrics.
Which issue(s) this PR fixes or relates to
Fixes #9052
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.