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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          3h 16m 1 Rakesh R 14/Oct/11 17:20
          Patch Available Patch Available Open Open
          13d 4h 39m 1 Patrick Hunt 27/Oct/11 22:00
          Open Open Resolved Resolved
          879d 23h 15m 1 Michi Mutsuzaki 25/Mar/14 21:15
          Michi Mutsuzaki made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Michi Mutsuzaki added a comment -

          ZOOKEEPER-1263 is fixed.

          Show
          Michi Mutsuzaki added a comment - ZOOKEEPER-1263 is fixed.
          Patrick Hunt made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          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.
          Patrick Hunt made changes -
          Parent ZOOKEEPER-1263 [ 12529149 ]
          Issue Type Bug [ 1 ] Sub-task [ 7 ]
          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.
          Rakesh R made changes -
          Link This issue incorporates ZOOKEEPER-1213 [ ZOOKEEPER-1213 ]
          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
          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.
          Rakesh R made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Rakesh R made changes -
          Attachment ZOOKEEPER-1227.patch [ 12499067 ]
          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.
          Rakesh R made changes -
          Field Original Value New Value
          Summary Zookeeper logs is showing -1 as min/max session timeout if there is no value configured in zoo.cfg Zookeeper logs is showing -1 as min/max session timeout if there is no sessiontimeout value configured
          Rakesh R created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development