Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3218

zk server reopened,the interval for observer connect to the new leader is too long,then session expired

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.6.0
    • None
    • win7 32bits

      zookeeper 3.4.6、3.4.13

    Description

      two participants、one observer,zkclient connect to observer。

      Then,close the two participants,the zookeeper server cloesed

      Ten seconds later,reopen the two participants,and leader selected

      ----------------------------------------------------------------------------

      But the observer can't connect to the new leader immediately。Because in lookForLeader, the observer use blockingQueue(recvqueue)  to offer/poll notifications,when the recvqueue is empty,poll from recvqueue will be blocked,and timeout is 200ms,400ms,800ms....60s。

      For example,09:59:59 observer poll notification,recvqueue was empty and timeout was 60s;10:00:00 two participants reopened and reselected;10:00:59 observer polled notification,connected to the new leader

      But the maxSessionTimeout default to 40s。The session expired

      -----------------------------------------------------------------------------

      Please improve it:observer should connect to the new leader as soon as possible

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              q_zero yangoofy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m