This is an automated email from the ASF dual-hosted git repository.

symat pushed a commit to branch branch-3.6
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.6 by this push:
     new 55317e9  ZOOKEEPER-4275: Prevent unnecessary client connection retry 
caused by slow SASL login
55317e9 is described below

commit 55317e9f6ac22b33b30d4114b8705ac4c318b385
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
    
    (cherry picked from commit c583a6e79654359b5daad5093d1730e370d3b75b)
---
 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 a727082..aeb95b6 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
@@ -1208,6 +1208,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();
                     }
 

Reply via email to