-
Notifications
You must be signed in to change notification settings - Fork 544
[SDK] fix: clear inflightRequests after each batch RPC call #5872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
f5ad274
to
1b7604c
Compare
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5872 +/- ##
=======================================
Coverage 55.19% 55.19%
=======================================
Files 1123 1123
Lines 59622 59620 -2
Branches 5029 5032 +3
=======================================
+ Hits 32906 32907 +1
+ Misses 25996 25993 -3
Partials 720 720
*This pull request uses carry forward flags. Click here to find out more.
|
activeBatch.forEach((inflight, index) => { | ||
// Handle the inflight request promise for each response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are just comments and re-arranging the if statements into if-else's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[SDK] fix: clear inflightRequests after each batch RPC call
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): CORE-667
Notes for the reviewer
The inflightRequests map is not correctly cleared after each RPC call resulting in errors being cached indefinitely and a potential memory leak. This PR clears the inflightRequests map after each RPC call.
How to test
Running a similar patch on Engine and testing if RPC error responses are cached.
PR-Codex overview
This PR focuses on improving error handling and response management in the
rpc.ts
file. It enhances clarity in the flow by explicitly managing different response types and ensuring that inflight requests are correctly resolved or rejected.Detailed summary
finally
block to clear theinflightRequests
map after processing.