-
Notifications
You must be signed in to change notification settings - Fork 32
Added an message decoder with limits of memory consumption #571
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #571 +/- ##
============================================
- Coverage 63.15% 62.90% -0.26%
+ Complexity 2462 2460 -2
============================================
Files 332 333 +1
Lines 14010 13950 -60
Branches 1412 1415 +3
============================================
- Hits 8848 8775 -73
- Misses 4516 4526 +10
- Partials 646 649 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This pull request adds a message decoder with memory consumption limits to address issue #554. The main objective is to prevent unbounded memory usage during message decompression by introducing a configurable memory limit and managing the decompression queue accordingly.
Key changes include:
- Introduction of a new
MessageDecoderclass that manages message decompression with memory limits - Refactoring of
PartitionSessionImplfrom a concrete class with builder pattern to an abstract class - Simplification of
MessageImplby removing the builder pattern and adding support for tracking uncompressed message sizes
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| MessageDecoder.java | New class implementing memory-limited message decoding queue with asynchronous decompression |
| PartitionSessionImpl.java | Converted to abstract class, removed builder pattern, delegated decoding to MessageDecoder |
| MessageImpl.java | Removed builder pattern, added uncompressedSize field for memory tracking |
| ReaderImpl.java | Updated to instantiate MessageDecoder and create anonymous PartitionSessionImpl instances |
| Batch.java | Renamed state tracking from decompressed to isReady for clarity |
| DataReceivedEventImpl.java | Updated method calls from getSessionInfo() to getSessionId() |
| DeferredCommitterImpl.java | Simplified error message construction |
| PartitionSession.java | Added toString() method for better error messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #554