ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1263 fix handling of min/max session timeout value initialization
  3. ZOOKEEPER-1227

Zookeeper logs is showing -1 as min/max session timeout if there is no sessiontimeout value configured

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.5.0
    • Component/s: server
    • Labels:
      None

      Description

      When starting the ZooKeeper without configuring 'minimumSessionTimeOut' and 'maximumSessionTimeOut'.

      I'm seeing the '-1' as the lower and the upper bound, instead it should give the default values : tickTime*2 and tickTime*20

      2011-10-14 13:07:18,761 - INFO  [main:QuorumPeerConfig@92] - Reading configuration from: /home/amith/CI/source/install/zookeeper/zookeeper1/bin/../conf/zoo.cfg
      
      2011-10-14 13:07:19,118 - INFO  [main:QuorumPeer@834] - tickTime set to 2000
      2011-10-14 13:07:19,119 - INFO  [main:QuorumPeer@845] - minSessionTimeout set to -1
      2011-10-14 13:07:19,119 - INFO  [main:QuorumPeer@856] - maxSessionTimeout set to -1
      

      Suggestion
      Move the defaulting logic to the QuorumPeerConfig instead of doing in the QuorumPeer

        Issue Links

          Activity

          Hide
          Rakesh R added a comment -

          I will soon upload the patch by moving the defaulting logic to the QuorumPeerConfig.

          Show
          Rakesh R added a comment - I will soon upload the patch by moving the defaulting logic to the QuorumPeerConfig.
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12499067/ZOOKEEPER-1227.patch
          against trunk revision 1180217.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 3 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/620//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/620//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/620//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12499067/ZOOKEEPER-1227.patch against trunk revision 1180217. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/620//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/620//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/620//console This message is automatically generated.
          Hide
          Rakesh R added a comment -

          I have observed the ZooKeeperServer (standalone) also having the 'sessiontimeout' defaulting logic as follows.

              public int getMinSessionTimeout() {
                  return minSessionTimeout == -1 ? tickTime * 2 : minSessionTimeout;
              }    
              public int getMaxSessionTimeout() {
                  return maxSessionTimeout == -1 ? tickTime * 20 : maxSessionTimeout;
              }
          

          I feel, if we move the defaulting logic to QPC as per the uploaded patch, this will be a duplicate logic and can be removed as well.

          Please be so kind gives your suggestion/thought, so that I can re-upload the patch.

          Thanks,
          Rakesh

          Show
          Rakesh R added a comment - I have observed the ZooKeeperServer (standalone) also having the 'sessiontimeout' defaulting logic as follows. public int getMinSessionTimeout() { return minSessionTimeout == -1 ? tickTime * 2 : minSessionTimeout; } public int getMaxSessionTimeout() { return maxSessionTimeout == -1 ? tickTime * 20 : maxSessionTimeout; } I feel, if we move the defaulting logic to QPC as per the uploaded patch, this will be a duplicate logic and can be removed as well. Please be so kind gives your suggestion/thought, so that I can re-upload the patch. Thanks, Rakesh
          Hide
          Rakesh R added a comment -

          IMO, the proposed solution will also help to resolve the scenario mentioned in ZOOKEEPER-1213. I feel, its better to keep in mind the use case.

          Show
          Rakesh R added a comment - IMO, the proposed solution will also help to resolve the scenario mentioned in ZOOKEEPER-1213 . I feel, its better to keep in mind the use case.
          Hide
          Patrick Hunt added a comment -

          Rolled this up to ZOOKEEPER-1263, close this when ZOOKEEPER-1263 is closed.

          Show
          Patrick Hunt added a comment - Rolled this up to ZOOKEEPER-1263 , close this when ZOOKEEPER-1263 is closed.
          Hide
          Michi Mutsuzaki added a comment -

          ZOOKEEPER-1263 is fixed.

          Show
          Michi Mutsuzaki added a comment - ZOOKEEPER-1263 is fixed.

            People

            • Assignee:
              Rakesh R
              Reporter:
              Rakesh R
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development