-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Java client: Avoid throwing a TimeoutException after the operation wa… #28387
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
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
|
@elasticmachine ok to test |
|
Hi @javanna looks like I passed the paperwork barriers ^ ;) In your hands now? |
|
yea @Sanne I'll try to figure out how to test this in the coming days. |
|
yes that's the hard part. I actually feel bad about sending a PR without tests :) Personally I would use Byteman for such cases, it helps re-create a scenario with parallel threads as you can block them on specific points and control the flow (Byteman was originally created to address the testing needs of our JTA library Narayana, later we started using it on other projects too). |
|
I was working to reproduce another issue but I think I stumbled into a fairly good test for this one. See this gist. |
|
I'd certainly prefer to have a more targeted test, but without one I think this is fairly useful. |
|
Pinging @elastic/es-core-infra |
|
hi @Sanne I think it was a mistake on my end to set this timeout, I also misunderstood what it was meant for. I would then prefer to leave the apache http async default if it's already ok, but it seems like its default value is |
|
One more thing, I am ok with the test that @nik9000 proposed above, maybe you can update the PR so we can finally get it in (sorry it took ages, I feel bad about that). |
|
@Sanne, would you like to pick up this PR and add a test, maybe similar to the one I proposed? Would you be OK if I picked it up? I think it is worth fixing this issue and you found the issue so I figure it is only right you get your name in the git history. |
|
No worries, we have taken ownership of this. I started working on some changes around timeouts including this one and adding tests, but I need first #29211 to go in otherwise resolving merge conflicts becomes a nightmare. |
|
awesome, thanks! Looking forward to see this benefit everyone else. |
|
Hi @javanna . What would you recommend as I have a requirement for 5.6.9? I tried |
|
hi @rafaelbattesti I'd assume it's a different problem if explicitly setting the connection request timeout doesn't help. Could you share your initialization code for the client, and the full stacktrace of the exception please? |
|
@javanna I found this has to do with the network setup. |
|
@rafaelbattesti glad to know you found the cause, would you mind sharing what caused the problem? |
|
@javanna I wouldn't mind if I had reached a precise diagnostic. I can tell it's a network setup because a basic |
…s successful
Closes #24069
Please consider backporting, I'm seeing quite some users affected by this.