Repository navigation
Backport release/v6.7: Bound frozen RPC router batch allocations - #4049
Conversation
Limit JSON-RPC batches to 1,000 calls by default and reject oversized batches during streaming decode with one bounded error response. Add a configurable 30-second HTTP write timeout to release slow-client handlers. Fixes PLT-1085 (cherry picked from commit 7ab2f13)
PR SummaryLow Risk Overview Batch handling no longer unmarshals the whole array up front. Reviewed by Cursor Bugbot for commit 320d923. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v6.7 #4049 +/- ##
================================================
- Coverage 61.30% 60.30% -1.00%
================================================
Files 2163 2064 -99
Lines 188768 177206 -11562
================================================
- Hits 115726 106868 -8858
+ Misses 62315 60547 -1768
+ Partials 10727 9791 -936
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 320d923. Configure here.
| Addr: cfg.listenAddress, | ||
| Handler: router, | ||
| ReadHeaderTimeout: 10 * time.Second, | ||
| WriteTimeout: cfg.writeTimeout, |
There was a problem hiding this comment.
Write timeout breaks proxied WebSockets
Medium Severity
The new WriteTimeout is set on the single HTTP server that also reverse-proxies non-POST traffic, including WebSocket upgrades, through liveProxy. Go leaves that write deadline on hijacked connections, and httputil.ReverseProxy does not clear it, so upgraded sockets die when the timer fires. The 30s default cuts off long-lived subscriptions, and --write-timeout cannot be 0 to restore unbounded writes.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 320d923. Configure here.


Backport of #4038 to
release/v6.7.