zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakeshadr <...@git.apache.org>
Subject [GitHub] zookeeper pull request #254: ZOOKEEPER-2775: ZK Client not able to connect w...
Date Wed, 17 May 2017 11:46:45 GMT
Github user rakeshadr commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/254#discussion_r116976191
  
    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1054,6 +1054,8 @@ private void sendPing() {
             private boolean saslLoginFailed = false;
     
             private void startConnect() throws IOException {
    +            // initializing it for new connection
    +            saslLoginFailed = false;
    --- End diff --
    
    How about setting to false only after client has successfully logged in instead of setting
to false at the beginning. 
    ```
    zooKeeperSaslClient = new ZooKeeperSaslClient(getServerPrincipal(addr), clientConfig);
    saslLoginFailed = false;
    ```
    I'm not sure about any concurrency cases between narrow window of resetting the flag to
false and the client attempt to do login operation. Since the previous operation was failed,
the client should still reflect the status until the login is successful next time, right?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message