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

Add single requestTimeout runner instead of setTimeout per request #650

Merged
merged 22 commits into from
Mar 14, 2020

Conversation

goriunov
Copy link
Contributor

@goriunov goriunov commented Mar 3, 2020

WIP, open for discussions

Propose change to requestTimeout logic to have separate runner which will check every inflight request every x ms. This is more performant than previous implementation and allow to enable requestTimeout for every single request without sacrificing performance much

@goriunov
Copy link
Contributor Author

goriunov commented Mar 4, 2020

I will fix tests properly if you are happy to process with this solution :)

src/network/requestQueue/index.js Outdated Show resolved Hide resolved
src/admin/index.spec.js Outdated Show resolved Hide resolved
src/network/connection.js Outdated Show resolved Hide resolved
@goriunov goriunov requested a review from Nevon March 9, 2020 00:01
src/admin/index.spec.js Outdated Show resolved Hide resolved
src/network/requestQueue/index.js Outdated Show resolved Hide resolved
src/network/connection.js Outdated Show resolved Hide resolved
@goriunov goriunov requested a review from Nevon March 9, 2020 21:06
@Nevon
Copy link
Collaborator

Nevon commented Mar 11, 2020

This looks really good now, in my opinion.

@Nevon Nevon merged commit 7c454fd into tulios:master Mar 14, 2020
@Nevon
Copy link
Collaborator

Nevon commented Mar 14, 2020

Thanks for the contribution! There will be a pre-release version out once the master build is done (https://dev.azure.com/tulios/kafkajs/_build/results?buildId=747&view=results). It should be version 1.13.0-beta.6. If you have a need for this feature, it would be great if you would give the pre-release version a spin and let us know how it's working.

@goriunov
Copy link
Contributor Author

👍 Definitely will try to run it within next few week. Thanks :)

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