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

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


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

commit 0d60bd2d97bad43678341fbd9de0e644dade5465
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 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();
                     }
 

Reply via email to