ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-366

Session timeout detection can go wrong if the leader system time changes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: quorum, server
    • Labels:
      None

      Description

      the leader tracks session expirations by calculating when a session will timeout and then periodically checking to see what needs to be timed out based on the current time. this works great as long as the leaders clock progresses at a steady pace. the problem comes when there are big (session size) changes in clock, by ntp for example. if time gets adjusted forward, all the sessions could timeout immediately. if time goes backward sessions that should timeout may take a lot longer to actually expire.

      this is really just a leader issue. the easiest way to deal with this is to have the leader relinquish leadership if it detects a big jump forward in time. when a new leader gets elected, it will recalculate timeouts of active sessions.

      1. ZOOKEEPER-366.patch
        0.8 kB
        Benjamin Reed

        Issue Links

          Activity

          Benjamin Reed created issue -
          Benjamin Reed made changes -
          Field Original Value New Value
          Assignee Benjamin Reed [ breed ]
          Benjamin Reed made changes -
          Attachment ZOOKEEPER-366.patch [ 12452653 ]
          Patrick Hunt made changes -
          Fix Version/s 3.3.3 [ 12315482 ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Component/s quorum [ 12312379 ]
          Component/s server [ 12312382 ]
          Benjamin Reed made changes -
          Fix Version/s 3.3.3 [ 12315482 ]
          Mahadev konar made changes -
          Fix Version/s 3.5.0 [ 12316644 ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Ted Dunning made changes -
          Link This issue duplicates ZOOKEEPER-1366 [ ZOOKEEPER-1366 ]
          Michi Mutsuzaki made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Benjamin Reed
              Reporter:
              Benjamin Reed
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development