Skip to content
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

fix: request.pipeline edgecases #207

Closed
wants to merge 1 commit into from
Closed

fix: request.pipeline edgecases #207

wants to merge 1 commit into from

Conversation

ronag
Copy link
Member

@ronag ronag commented May 30, 2020

The optimizated verison of request.pipeline had some hard
to determine edge cases. Reverting back to non-optimized
version until a better solution can be implemented.

Fixes: #206

@ronag
Copy link
Member Author

ronag commented May 30, 2020

Will follow up at some point with a version where the Duplex writes directly to the socket, bypassing even having a Readable. #208

@ronag ronag force-pushed the pipeline-edge branch 9 times, most recently from e0f41db to 2337d75 Compare May 30, 2020 14:14
// TODO: The callback might not be invoked
// on error in pre Node 14.
// TODO: The callback might not correspond
// to a successful flush of the socket.
Copy link
Member Author

Choose a reason for hiding this comment

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

These notes probably don't have much if any impact in practical usage. But it might not strictly follow the expected API contract.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will require some further work (#208) to fully resolve but I don't think this is a blocker for release.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

I am concerned by the drop in throughput of pipeline.

@@ -88,17 +86,15 @@ class Client extends ClientBase {
return new PassThrough().destroy(new InvalidArgumentError('invalid handler'))
}

let req = new Readable({
// TODO: Let ret write directly to socket without intermediate.
const req = new PassThrough({
Copy link
Member

Choose a reason for hiding this comment

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

This should really be a Readable. Otherwise it’s costing us dearly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok. I'll give it another try.

The optimizated verison of request.pipeline had some hard
to determine edge cases. Reverting back to non-optimized
version until a better solution can be implemented.

Fixes: #206
@ronag
Copy link
Member Author

ronag commented May 30, 2020

Fixed through c553ba1 instead.

@ronag ronag closed this May 30, 2020
@ronag ronag deleted the pipeline-edge branch July 5, 2020 16:52
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.

Review request.pipeline edge cases
2 participants