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: requestTimeout monitors from sent #343

Merged
merged 7 commits into from
Aug 22, 2020
Merged

fix: requestTimeout monitors from sent #343

merged 7 commits into from
Aug 22, 2020

Conversation

ronag
Copy link
Member

@ronag ronag commented Aug 19, 2020

This changes so that requestTimeout measures how long a requests
has been in the pipeline (i.e. running). This is a more useful measure than how
long the request has been enqueued on the client, which is something
that is predictable.

Also normalizes the behavior between Pool and Client.

Fixes: #341

If user properly uses Client.busy there should be no difference in observed behavior.

@ronag ronag requested a review from mcollina August 19, 2020 21:15
@ronag ronag force-pushed the request-timeout branch 2 times, most recently from 46df119 to 49fde01 Compare August 19, 2020 21:15
@ronag
Copy link
Member Author

ronag commented Aug 19, 2020

Some failing tests to sort out if this is an acceptable approach.

test/request-timeout.js Outdated Show resolved Hide resolved
@ronag ronag added semver-major Features or fixes that will be included in the next semver major release bug Something isn't working labels Aug 19, 2020
@ronag
Copy link
Member Author

ronag commented Aug 19, 2020

Counting from the client queue makes little sense as a higher level abstraction (like Pool) might also have a queue.

@ronag ronag force-pushed the request-timeout branch 4 times, most recently from 721fc28 to 6938d16 Compare August 21, 2020 08:25
@ronag
Copy link
Member Author

ronag commented Aug 21, 2020

@mcollina this was not reviewable, fixed now, sorry about that. If you approve I'll sort out the tests as well.

@mcollina
Copy link
Member

Can you add a test?

@ronag
Copy link
Member Author

ronag commented Aug 21, 2020

Can you add a test?

I'll take that preliminary approval. Fixing tests.

@mcollina
Copy link
Member

The change is ok

@ronag
Copy link
Member Author

ronag commented Aug 21, 2020

@mcollina: I found another issue while working at this. Basically i had to change maxAbortedPayload to a abortedTimeout which kind of makes more sense.

PTAL

@ronag ronag force-pushed the request-timeout branch 2 times, most recently from 69979fe to 3cc4fe9 Compare August 21, 2020 20:10
@ronag ronag force-pushed the request-timeout branch 4 times, most recently from e7f2ad7 to cbac7da Compare August 21, 2020 20:39
@ronag ronag force-pushed the request-timeout branch 2 times, most recently from 8b7439e to 6647f53 Compare August 21, 2020 20:58
@ronag
Copy link
Member Author

ronag commented Aug 22, 2020

Another option is to just always destroy the socket if a running request at the head of the pipeline is aborted. KISS? I.e. skip abortedtimeout and maxabortedpayload

@mcollina
Copy link
Member

Kiss!

@ronag ronag force-pushed the request-timeout branch 2 times, most recently from 6cf731b to 476b82c Compare August 22, 2020 08:51
@ronag ronag mentioned this pull request Aug 22, 2020
17 tasks
@ronag
Copy link
Member Author

ronag commented Aug 22, 2020

@mcollina KISS applied. PTAL

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.

lgtm

@ronag ronag merged commit a94ff35 into master Aug 22, 2020
@ronag
Copy link
Member Author

ronag commented Aug 23, 2020

@delvedor FYI might also be of interest for you

@ronag ronag deleted the request-timeout branch April 25, 2021 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver-major Features or fixes that will be included in the next semver major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

request timeout does not apply while in Pool queue
2 participants