This is an automated email from the ASF dual-hosted git repository.
symat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/master by this push:
new c583a6e ZOOKEEPER-4275: Prevent unnecessary client connection retry
caused by slow SASL login
c583a6e is described below
commit c583a6e79654359b5daad5093d1730e370d3b75b
Author: Ravi Kishore Valeti <[email protected]>
AuthorDate: Mon Apr 19 06:46:15 2021 +0000
ZOOKEEPER-4275: Prevent unnecessary client connection retry caused by slow
SASL login
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.
Raising the PR for master - approved for 3.5 branch already.
Author: Ravi Kishore Valeti <[email protected]>
Reviewers: Mate Szalay-Beko <[email protected]>, Norbert Kalmar
<[email protected]>, Mohammad Arshad <[email protected]>
Closes #1685 from rvaleti/ZOOKEEPER-4275_master
---
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
index 1ff4512..a516d84 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
@@ -1198,6 +1198,8 @@ public class ClientCnxn {
}
onConnecting(serverAddress);
startConnect(serverAddress);
+ // Update now to start the connection timer right
after we make a connection attempt
+ clientCnxnSocket.updateNow();
clientCnxnSocket.updateLastSendAndHeard();
}