-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[exporterhelper] Support mixed sizer types in persistent queue without draining #13246
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
base: main
Are you sure you want to change the base?
[exporterhelper] Support mixed sizer types in persistent queue without draining #13246
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (77.92%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #13246 +/- ##
==========================================
- Coverage 91.57% 91.45% -0.12%
==========================================
Files 522 521 -1
Lines 29089 29155 +66
==========================================
+ Hits 26639 26665 +26
- Misses 1933 1959 +26
- Partials 517 531 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This refactoring eliminates sizer type dependencies in persistent queues, enabling seamless mixed sizer usage without requiring queue draining. Key changes: - Embed itemSize in each QueueItem for mixed sizer support - Consolidate metadata storage with single protobuf structure (qmv0 key) - Add backward compatibility with automatic legacy format migration - Remove obsolete SizerType enum and conversion logic - Update persistent queue logic for new metadata format - Add comprehensive migration tests and update existing tests - Add changelog entry for enhancement tracking Fixes open-telemetry#12890 Related to: open-telemetry#13126
abf1753
to
70024af
Compare
// QueueItem represents a single item stored in the persistent queue. | ||
message QueueItem { | ||
// Size of the item according to the sizer that was active when enqueued | ||
int64 item_size = 1; | ||
// The marshaled data of the item. | ||
bytes item_data = 2; |
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.
We did a lot of work to avoid multiple copies and allocations of the marshalled bytes in @dmitryax pdatax work, and here we will just re-allocate and copy the whole data.
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.
Should the current PR be closed?
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 provided comment in the other PR, please focus on adopting what we design first.
Summary
Implements non-blocking queue handling for sizer configuration changes by embedding item size information directly into queue items, eliminating the need to drain queues when switching between different sizer types.
Problem Statement
Solution
itemSize
in each queue item using newQueueItem
protobuf messageqmv0
keySizerType
trackingBreaking Changes
None - Fully backward compatible with automatic migration
Testing
Performance Impact