Skip to content

Conversation

@alex268
Copy link
Member

@alex268 alex268 commented Jan 2, 2026

Fixes #554

@alex268 alex268 requested a review from pnv1 January 2, 2026 15:18
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 78.72340% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.90%. Comparing base (02fd46c) to head (6281ece).

Files with missing lines Patch % Lines
.../java/tech/ydb/topic/read/impl/MessageDecoder.java 73.21% 9 Missing and 6 partials ⚠️
...tech/ydb/topic/read/impl/PartitionSessionImpl.java 90.24% 1 Missing and 3 partials ⚠️
...main/java/tech/ydb/topic/read/impl/ReaderImpl.java 80.00% 3 Missing and 1 partial ⚠️
...ain/java/tech/ydb/topic/read/impl/MessageImpl.java 87.50% 2 Missing ⚠️
.../topic/read/impl/events/DataReceivedEventImpl.java 0.00% 2 Missing ⚠️
...ain/java/tech/ydb/topic/read/PartitionSession.java 0.00% 1 Missing ⚠️
.../src/main/java/tech/ydb/topic/read/impl/Batch.java 75.00% 0 Missing and 1 partial ⚠️
...ech/ydb/topic/read/impl/DeferredCommitterImpl.java 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a 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 MessageDecoder class that manages message decompression with memory limits
  • Refactoring of PartitionSessionImpl from a concrete class with builder pattern to an abstract class
  • Simplification of MessageImpl by 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.

@alex268 alex268 merged commit ba287c2 into ydb-platform:master Jan 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Topic read session: problems with memory consumption in case of high compression ratio

3 participants