Conversation
|
cc @Jens-G when you have a moment 🙏 |
Code reviewFound 1 issue:
Lines 27 to 29 in 7d6be86 Lines 48 to 50 in 7d6be86 One suggestion, below the bar for the list above but verified:
thrift/lib/rs/src/protocol/mod.rs Lines 1213 to 1224 in 7d6be86 thrift/lib/rs/src/protocol/mod.rs Lines 407 to 411 in 7d6be86 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
7d6be86 to
875bd8f
Compare
|
@Jens-G Filed THRIFT-6290 and updated the PR title and commit subject to start with it: On the test note: agreed that the current tests would still pass if skip() went back to read_bytes(), or if the skip_binary forward on Box or TStoredInputProtocol were dropped. Happy to add a transport that records the largest buffer it is asked to fill, and assert that skipping a 1024-byte string never asks for more than 256, if you want that in this PR. |
|
Thanks — THRIFT-6290 settles the ticket point. Yes please, add the recording transport in this PR. "Skipping a 1024-byte string never asks for more than 256 bytes" is exactly the two-state signal the current tests are missing: they pass either way, because the old and the new path consume the same bytes and return the same errors. Worth covering all three places the forward can be lost, not just the protocols themselves: 🤖 Generated with Claude Code |
Client: rs skip() used read_bytes() and dropped the Vec. Binary and compact now read the length prefix and discard the payload through a stack buffer. Co-Authored-By: Grok 4.7 <noreply@x.ai>
875bd8f to
e54863c
Compare
|
@Jens-G Added that recording transport in e54863c. Skipping a 1024-byte string now asserts the transport is never asked to fill more than 256 bytes, on |
Client: rs
JIRA: https://issues.apache.org/jira/browse/THRIFT-6290
skip(TType::String)allocated aVecthe size of the field viaread_bytes()and immediately dropped it. Binary and compact now read the length prefix and discard the payload through a 256-byte stack buffer (skip_binary/discard_exact). Negative binary sizes andmax_string_sizestill apply. CustomTInputProtocolimpls keep the allocating default.[skip ci]anywhere in the commit message to free up build resources.