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

Default request timeout in cluster #739

Merged
merged 6 commits into from
Jun 27, 2020
Merged

Conversation

Nevon
Copy link
Collaborator

@Nevon Nevon commented Jun 3, 2020

This moves the default request timeout up from the connection up to the cluster, as with the connection timeout. The target topic mutation lock is using the request timeout as a proxy for how long it should wait before releasing the lock. With the current code, if the cluster doesn't have a request timeout set, the lock gets the default connection timeout of 1000ms, while the request itself doesn't time out until 29 seconds later.

In doing this, I also removed the default timeout from the Lock, as the default wasn't actually being used anywhere, and I didn't think a default made any sense really, since it depends entirely on what the lock is being used for.

This hopefully fixes #695.

I also added a way to mark tests as flaky, as I noticed that one of the tests in assignmentForUnsubscribedTopic failed every 10-20 runs or so on my local machine, and while I didn't have the energy to try and fix it right now, I think it makes sense to mark it as flaky so that it's easier to know in the future where to direct your efforts. All it does is prefix the description of the test with [flaky] so that you can target flaky tests directly using --testNamePattern=flaky.

Nevon added 3 commits June 3, 2020 14:06
The cluster needs to know the request timeout to know how long it should hold the target topic mutation lock. Fixes #695.
The intention is to make it easier to target flaky tests for fixing, by running
`yarn test:local:watch --testNamePattern=flaky`.
@Nevon Nevon requested review from tulios and JaapRood June 3, 2020 12:50
@Nevon Nevon merged commit c6dfc16 into master Jun 27, 2020
@Nevon Nevon deleted the default-request-timeout-in-cluster branch June 27, 2020 07:15
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.

KafkaJSLockTimeout: Timeout while acquiring lock (2 waiting locks): "updating target topics"
1 participant