test(facade): cover shared RESP V2 buffer - #8180
Conversation
PR Summary by QodoExpand shared RESP V2 buffer regression coverage
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record Powered by Qodo |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Pull request overview
Adds coverage for shared RESP V2 read-buffer correctness across parser, buffer ownership, and integration scenarios.
Changes:
- Tests exclusive borrowing and fiber-switch invariants.
- Adds parser fragmentation and source-reuse tests.
- Expands integration coverage across clients, backpressure, TLS, migration, and listeners.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/dragonfly/connection_test.py |
Adds shared-buffer integration and configuration tests. |
src/facade/resp_srv_parser_test.cc |
Tests fragmented parsing and source-buffer reuse. |
src/facade/proactor_read_buffer_test.cc |
Tests shared-buffer borrowing invariants. |
src/facade/CMakeLists.txt |
Registers the new unit-test target. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🤖 Augment PR SummarySummary: This PR expands regression coverage for the RESP V2 shared read buffer. Changes:
Technical Notes: Tests use small shared buffers and explicit proactor counts to force reuse, overflow copying, and cross-connection behavior. 🤖 Was this summary useful? React with 👍 or 👎 |
Follow-up to feat(facade): share the RESP V2 read buffer. GoogleTest: 1) Add GoogleTest coverage in proactor_read_buffer_test.cc for exclusive borrowing, empty-buffer release, and preventing borrows from crossing a fiber switch. 2) Extend resp_srv_parser_test.cc with source-reuse and fixed-seed fragmentation coverage for inline, multibulk, and large bulk requests. Regression Tests/pytest: Add integration coverage for interleaved clients, pipeline backpressure and overflow recovery, blocking commands, migration, protocol errors, RESET/PAUSE, DEBUG TRAFFIC, TLS, Unix/admin listeners, accounting, and io_uring provided-buffer exclusion. Use explicit V1/V2 and shared-buffer settings so private and shared buffer behavior are tested independently.
7a2e968 to
d4d4d11
Compare
Signed-off-by: Gil Levkovich <69595609+glevkovich@users.noreply.github.com>
|
I am slightly confused with the direction and maybe I missed something from thursday/friday or in general 😄 Have we decided that we will use the shared read buffer or are we replacing it with provided buffers ? Last time I wrote these comments #8145 (comment) mentioning that the shared read buffer is workaround to the provided buffers. Are we following with both solutions, one or ? (I am asking so I know what to comment on and what not) |
@kostasrim The shared proactor read buffer is not being replaced by provided buffers. It remains the solution for cases where provided buffers cannot or should not be used:
The provided-buffer work is an io_uring only optimization for non-TLS connections. The shared-buffer work is still required independently.In addition, It does help with io-uring development since it also establishes the receive/parse invariant for the provided-buffer iouring work: acquire a buffer (no need to read in this case), parse it without preemption. Provided buffers have a stricter lifetime rules, but the parsing and staging rules are closely related. So my idea is to keep and test the shared proactor buffer as the general pull backend + Keep the shared buffer as the automatic fallback, not as a competing implementation. This PR is therefore still useful since it provides coverage for the shared pull backend, but it also provides the regression baseline for the later provided-buffer implementation. |
Sure no issue with that. Approved.
I am not sure why we need to worry about any of these when we have not yet proved that ioloop v2 is actually better than v1 🤷 |
@kostasrim I agree. That's why I'm holding with merging this PR and not merging it for now. |
This is a follow-up test coverage to feat(facade): share the RESP V2 read buffer.
Note:
GoogleTest:
Regression Tests/pytest:
Add integration coverage for interleaved clients, pipeline backpressure and overflow recovery, blocking commands, migration, protocol errors, RESET/PAUSE, DEBUG TRAFFIC, TLS, Unix/admin listeners, accounting, and io_uring provided-buffer exclusion.
Use explicit V1/V2 and shared-buffer settings so private and shared buffer behavior are tested independently.