Title: quic: Accumulation buffer is not filled, if small packets arrive · Issue #64035 · nodejs/node · GitHub
Open Graph Title: quic: Accumulation buffer is not filled, if small packets arrive · Issue #64035 · nodejs/node
X Title: quic: Accumulation buffer is not filled, if small packets arrive · Issue #64035 · nodejs/node
Description: I have the following situation: On http/3 (actually webtransport) the underlying data stream consists of 1024 byte packages (coming from a third party server), I see on the reader that the bytes arrive in packets of 100 bytes on js direc...
Open Graph Description: I have the following situation: On http/3 (actually webtransport) the underlying data stream consists of 1024 byte packages (coming from a third party server), I see on the reader that the bytes ar...
X Description: I have the following situation: On http/3 (actually webtransport) the underlying data stream consists of 1024 byte packages (coming from a third party server), I see on the reader that the bytes ar...
Opengraph URL: https://github.com/nodejs/node/issues/64035
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"quic: Accumulation buffer is not filled, if small packets arrive","articleBody":"I have the following situation:\nOn http/3 (actually webtransport) the underlying data stream consists of 1024 byte packages (coming from a third party server), I see on the reader that the bytes arrive in packets of 100 bytes on js directly from the nghttp3 parser without being accumulated in the buffer.\nThe reason is that in `ReceiveData` in `streams.cc`:\n```\n } else if (reader_ \u0026\u0026 was_empty) {\n printf(\"RD 10\\n\");\n // Notify the reader once when the accumulator transitions from empty\n // to non-empty. This wakes the reader exactly once per accumulation\n // cycle. When the reader wakes and calls pull(), BeforePull() flushes\n // the accumulated data, and the subsequent EntryRead() extends the\n // flow control window. We do NOT notify on every callback — that\n // would defeat coalescing by flushing tiny amounts each time.\n reader_-\u003eNotifyPull();\n printf(\"RD 11\\n\");\n }\n```\ndoes actually not cause a wake, but an immediate execution at least for:\n```\n console.log('before wakeup')\n const fin = await wakeup.promise;\n console.log('after wakeup')\n```\nin `createBlobReaderIterable` .\nHere is a log trace:\n```\nReceive data wt 100\nRD 1\nRD 2\nRD 4\nRD 5\nRD 8\nRD 10\nafter wakeup\nFlush acc not pull \n webtransport:http3wtstream(3804) commitReadBuffer 100 +1ms\nread mark2 4061 1781992229358 406100 100\nbefore wakeup\nafter wakeup\nbefore wakeup\nRD 11\nReceive data wt 100\n```\nto prove it. And yes, it is woken up twice per cycle via `Stream::FlushAccumulation()` (that is the \"Flush acc not pull\" printout).\n\nIf I can trust on what is gemini saying, it is that the call from C++ will immediately schedule all microtasks before return, but I do not trust it....\n\nIt is unclear, if `createBlobReaderStream(reader)` will show the same issues.\n\nMy first reflex is to wrap the call to the wakeup call in a `nextTick` or `setImmediate` call , but maybe @jasnell or @pimterry know a better way?\n\n","author":{"url":"https://github.com/martenrichter","@type":"Person","name":"martenrichter"},"datePublished":"2026-06-20T22:16:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/64035/node/issues/64035"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c90a3ad5-7154-39a8-c56d-eb4a5a63508d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E870:374E1E:1ADA3F3:26BD6FF:6A4CE386 |
| html-safe-nonce | 54d58589422be94b17ffe85afc591a12c996825c12a71768a1e5c2c0c1fab84b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODcwOjM3NEUxRToxQURBM0YzOjI2QkQ2RkY6NkE0Q0UzODYiLCJ2aXNpdG9yX2lkIjoiNTMzNzgzNDQxMDA3MzcxMTQ5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b9f8edc9d07f207c2d91e7f8a3418ed3f0a427332e890e0c3687b856f257a117 |
| hovercard-subject-tag | issue:4708538425 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64035/issue_layout |
| twitter:image | https://opengraph.githubassets.com/950569bd0a581e20f33fb23abc81d843d774dc326c5e5eac759b0c0f4e0c1344/nodejs/node/issues/64035 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/950569bd0a581e20f33fb23abc81d843d774dc326c5e5eac759b0c0f4e0c1344/nodejs/node/issues/64035 |
| og:image:alt | I have the following situation: On http/3 (actually webtransport) the underlying data stream consists of 1024 byte packages (coming from a third party server), I see on the reader that the bytes ar... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | martenrichter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width