-
Notifications
You must be signed in to change notification settings - Fork 773
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
Update ForceFlush behavior to meet with the latest spec requirements #2388
Conversation
var sw = Stopwatch.StartNew(); | ||
|
||
while (cur != null) | ||
{ | ||
if (timeoutMilliseconds == Timeout.Infinite) | ||
{ | ||
_ = cur.Value.ForceFlush(Timeout.Infinite); | ||
result = cur.Value.ForceFlush(Timeout.Infinite) && result; |
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.
nit: can use &=
operator
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.
I think no, &=
has different semantic (short-circuit ForceFlush
when result
is true) than what we need (ForceFlush
would always be called).
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## main #2388 +/- ##
==========================================
+ Coverage 79.91% 79.93% +0.01%
==========================================
Files 231 231
Lines 7445 7440 -5
==========================================
- Hits 5950 5947 -3
+ Misses 1495 1493 -2
|
Fixes #2386.
Related to #2385.
Changes
Infinite
(`-1).CompositeProcessor.OnForceFlush
logic to meet with the latest spec requirement (also aligns with metrics SDK spec).On...
callbacks (because they will not be called by end users).For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes