Skip to content

MLE-32219 : Fix mixed-content array writes that hang on Node v26 - #1139

Open
adganta wants to merge 3 commits into
developfrom
MLE-32219-fix-mixed-content-array
Open

adganta wants to merge 3 commits into
developfrom
MLE-32219-fix-mixed-content-array

Conversation

@adganta

@adganta adganta commented Dec 1, 2026

Copy link
Copy Markdown

fix mixed-content array writes that hang on Node v26

Copilot AI balanced review requested due to automatic review settings December 1, 2026 09:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unfinished content streams lose their error handlers when the request closes, allowing a later asynchronous stream error to terminate the process even if the caller catches the write rejection.

1 open issue
What changed in this PR

This PR addresses mixed-content document writes that hang on Node.js v26 by changing how the client sends multipart batches containing streams.

Changes:

  • Writes multipart headers and content sequentially, piping streamed parts directly to the request.
  • Adds source-error and premature-close handling.
  • Adds regression tests for content ordering, binary integrity, metadata, and mixed-document round trips.
File Description
test-basic/​documents-multipart-header-test.js Adds HTTP capture tests for multipart content and stream failures.
test-basic/​documents-core.js Adds a mixed JSON/file-stream write-and-read integration test.
lib/​requester.js Replaces multipart assembly for stream-containing batches with sequential request writes.

Review effort: Balanced

Comment thread lib/requester.js Resolved
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.

2 participants