SY-3556: Use high performance codecs for iterators#2272
Open
SY-3556: Use high performance codecs for iterators#2272
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## rc #2272 +/- ##
==========================================
+ Coverage 64.30% 64.34% +0.04%
==========================================
Files 2166 2167 +1
Lines 109898 110364 +466
Branches 8298 8348 +50
==========================================
+ Hits 70669 71014 +345
- Misses 33183 33277 +94
- Partials 6046 6073 +27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@greptile /rerun |
emilbon99
requested changes
Apr 28, 2026
Contributor
emilbon99
left a comment
There was a problem hiding this comment.
Make sure that you've run relevant benchmarks to make sure you haven't introduced any significant performance regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Pull Request
Linear Issue
SY-3556
Description
Use high-performance codecs for iterators and remove the option for client libraries to disable the high-performance codec.
Basic Readiness
Greptile Summary
This PR promotes the high-performance binary codec from opt-in/experimental to the sole transport encoding for all three framer streams (writer, streamer, and iterator) across C++, Python, TypeScript, and Go, while also fixing a correctness bug in the
allChannelsPresentflag for multi-domain iterator frames. Theenable_experimental_codecandenable_proto_frame_cachingoptions are removed from all client APIs, theIteratorResponseprotobuf gets abufferfield for binary-encoded frames, and newWSIteratorCodecclasses/codecs are added in TypeScript and Python to handle the mixed binary-data / JSON-ack response stream.Confidence Score: 5/5
Safe to merge; only one P2 style/defensive concern found, no P0/P1 issues.
All findings are P2. The changes are well-structured, comprehensively tested (new suites for gRPC framer, HTTP framer, and codec), and the core codec bug fix is regression-tested. The only flagged issue —
forEachwithout early exit in the TypeScriptall_channels_presentdecode path — is a defensive concern that does not affect normal operation.client/ts/src/framer/codec.ts —
forEachin thechannelFlag=truedecode path cannot early-exit on failure, unlike the corresponding Python andwhile-loop branches.Important Files Changed
forEachin all_channels_present path can't early-exit on failure unlike Python and the new while-loop path.allChannelsPresentflag by verifying key ordering, not just count — corrects multi-domain frame encoding bug (SY-3556 regression fix).bytes buffer = 8to IteratorResponse; removesenable_experimental_codecfrom StreamerRequest — field numbers preserved on both.Sequence Diagram
sequenceDiagram participant Client as Client (TS/Py/C++) participant Codec as WSIteratorCodec participant Server as Server (Go gRPC/HTTP) Client->>Server: JSON open request (command=Open, keys, bounds) Server->>Server: codec.Update(keys) → initialize codec Server-->>Client: LOW_PERF prefix + JSON ack (variant=Ack, ack=true) Codec->>Client: JSON decode → IteratorResponse{variant=Ack} loop next / prev / seekFirst / seekLast Client->>Server: JSON request (command=Next, span=...) Server->>Server: codec.Encode(frame) → binary buffer Server-->>Client: HIGH_PERF prefix + binary frame (variant=Data) Codec->>Client: binary decode → IteratorResponse{variant=Data, frame} Server-->>Client: LOW_PERF prefix + JSON ack (variant=Ack) Codec->>Client: JSON decode → IteratorResponse{variant=Ack} end Client->>Server: JSON close_send Server-->>Client: EOFReviews (9): Last reviewed commit: "Fix TS client linting issue" | Re-trigger Greptile