Ability to configure reader buffer threshold#803
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a configurable buffer release threshold to the Topic reader so the client can batch “freed buffer” notifications (ReadRequests) to reduce round-trips.
Changes:
- Exposes
buffer_release_thresholdonTopicClient.reader(...)(async + sync) and documents it. - Adds
PublicReaderSettings.buffer_release_thresholdwith[0.0, 1.0]validation. - Implements accumulated buffer release + adds unit/integration tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ydb/topic.py | Exposes buffer_release_threshold in public reader factory methods. |
| ydb/_topic_reader/topic_reader.py | Adds setting + validates threshold range in PublicReaderSettings. |
| ydb/_topic_reader/topic_reader_asyncio.py | Accumulates released bytes and sends ReadRequest when threshold is reached or queue empties. |
| ydb/_topic_reader/topic_reader_asyncio_test.py | Adds unit tests for threshold behavior + validation. |
| tests/topics/test_topic_reader.py | Adds async + sync integration tests to ensure the new parameter works end-to-end. |
| docs/topic.rst | Documents the new parameter semantics and provides an example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
abca2d1 to
5f1b52b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5f1b52b to
67ee392
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
67ee392 to
662885a
Compare
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Closes: #442
What is the new behavior?
Other information