-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[exporter] internal/persistent_queue::OnProcessingFinished is changed to a class function instead of a callback #11338
[exporter] internal/persistent_queue::OnProcessingFinished is changed to a class function instead of a callback #11338
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11338 +/- ##
==========================================
- Coverage 91.80% 91.79% -0.01%
==========================================
Files 432 432
Lines 20423 20426 +3
==========================================
+ Hits 18749 18751 +2
- Misses 1300 1301 +1
Partials 374 374 ☔ View full report in Codecov by Sentry. |
a71969d
to
220ff5e
Compare
220ff5e
to
3c3cace
Compare
// getNextItem pulls the next available item from the persistent storage along with a callback function that should be | ||
// called after the item is processed to clean up the storage. If no new item is available, returns false. |
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.
Please update the comment
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.
Thanks!
Co-authored-by: Dmitrii Anoshin <[email protected]>
Failing contrib tests are unrelated, broken on main |
… to a class function instead of a callback (open-telemetry#11338) #### Description Why this change? Each request from the queue contains multiple items, and those items could be merge-split into multiple batches when they are sent out (see open-telemetry#8122 for more about exporter batcher). We would like to book-keep those cases, and only call `onProcessingFinished` when all such batches has gone out. In this PR, `onProcessingFinished` is changed from a callback to a method function because it is easier to book keep index instead of functions. #### Link to tracking issue open-telemetry#8122 open-telemetry#10368 #### Testing `exporter/internal/queue/persistent_queue_test.go` #### Documentation This is an internal change invisible to the users. --------- Co-authored-by: Dmitrii Anoshin <[email protected]>
Description
Why this change?
Each request from the queue contains multiple items, and those items could be merge-split into multiple batches when they are sent out (see #8122 for more about exporter batcher). We would like to book-keep those cases, and only call
onProcessingFinished
when all such batches has gone out. In this PR,onProcessingFinished
is changed from a callback to a method function because it is easier to book keep index instead of functions.Link to tracking issue
#8122
#10368
Testing
exporter/internal/queue/persistent_queue_test.go
Documentation
This is an internal change invisible to the users.