curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randgalt <...@git.apache.org>
Subject [GitHub] curator pull request #157: Long session timeout issue
Date Tue, 14 Jun 2016 03:56:48 GMT
Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/157#discussion_r66905732
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
---
    @@ -252,7 +252,9 @@ private void processEvents()
                 {
                     int lastNegotiatedSessionTimeoutMs = client.getZookeeperClient().getLastNegotiatedSessionTimeoutMs();
                     int useSessionTimeoutMs = (lastNegotiatedSessionTimeoutMs > 0) ? lastNegotiatedSessionTimeoutMs
: sessionTimeoutMs;
    -                int pollMaxMs = (useSessionTimeoutMs * 2) / 3; // 2/3 of session timeout
    +                long elapsedMs = startOfSuspendedEpoch == 0 ? 0 : System.currentTimeMillis()
- startOfSuspendedEpoch;
    +                long pollMaxMs = useSessionTimeoutMs - elapsedMs;
    --- End diff --
    
    We should probably add a 50% factor here or something. It seems suspicious to wait the
entire session time if there isn't a suspended state.


---
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