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
ZOOKEEPER-4275 Slowness in sasl login or subject.doAs() causes zk client to falsely assume that the server did not respond, closes connection and goes to unnecessary retries #1684
base: branch-3.5
Are you sure you want to change the base?
Conversation
…ent to falsely assume that the server did not respond, closes connection and goes to unnecessary retries
The test is passing on my machine. Not sure if it's a flapper? $ mvn clean test -Dtest=ReconfigTest -pl zookeeper-server main: |
yeah, seems flaky... I retriggered the test and now everything seems green |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, really nice catch, thank you!
I checked the code path, you are right and this is a good fix when the kerberos authentication is slow.
I wonder if it would be possible to do a unit test for this somehow. Can you take a look? If it is not easy (timing related unit tests can be ugly), then I don't think it would be absolutely necessary.
Also please submit a separate PR to the master branch, where the same issue is also present. We fix bugs first on the master branch, then usually cherry-pick the fixes to other active branches. Thank you!
Hi @symat I raised a PR for master branch as suggested. I did spend a lot of time on trying to add a test for this. Inducing a sleep in to ClientCnxn#SendThread#startConnect() or ZookeeperSaslClient was not feasible. We have to do a lot of refactoring in order to get there.
Please let me know if there's an easy way out. |
This should be a clean cherry-pick to 3.5 from master, so I think this PR can be closed. But since all green it can as well stay and merged from here. |
Thanks @rvaleti ! I don't see an easy way for unit test either, and I wouldn't make a major refactoring in the production code just for this test... I think we can skip the unit test this case. Thanks for the PR on the master branch, I agree with @nkalmar that you can close this PR (on branch-3.5), as we will simply cherry-pick the master commit to the other branches. Anyway, it was good to get also a green CI run on branch-3.5, that never hurts :) |
hi @maoling ! I think we already pushed this fix to all active branches. E.g. it is present on 3.5, see: https://github.com/apache/zookeeper/commits/branch-3.5 |
No description provided.