Skip to content

fix the batch size not respected issue #6528

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

Merged
merged 3 commits into from
May 19, 2025

Conversation

mengdd
Copy link
Contributor

@mengdd mengdd commented May 16, 2025

Fix the issue:
#6527

Fix: If the batch size is reaching limit, send the requests immediately in the current withLock block.

I have created some dummy fake sample to demonstrate the issue and fix in a simple way: https://gist.github.com/mengdd/d8e51d858e3c0f30018e10ed73686569

@mengdd mengdd requested review from martinbonnin and BoD as code owners May 16, 2025 07:17
@apollo-cla
Copy link

@mengdd: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented May 16, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 00a5dfff128a14d156b9283c

@BoD
Copy link
Contributor

BoD commented May 16, 2025

Thanks a lot for the detailed bug report, and fix!

I've just added a test that fails on the main branch and works here.

@@ -90,7 +99,7 @@ class QueryBatchingTest {

// Only one request must have been sent
assertFails {
mockServer.awaitRequest()
mockServer.awaitRequest(3.seconds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Not related, but these tests took 30s each time)

@BoD BoD merged commit 5a9edd4 into apollographql:main May 19, 2025
7 checks passed
martinbonnin pushed a commit that referenced this pull request Jun 4, 2025
* fix the batch size not respected issue

* Add a unit test

* Fix node tests hanging

---------

Co-authored-by: BoD <BoD@JRAF.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants