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

ClientCnxn#run could miss the second ping or connection get dropped before a ping

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.5
    • Fix Version/s: 3.4.6, 3.5.0
    • Component/s: None
    • Labels:
      None

      Description

      We could throw SessionTimeoutException exception even when timeToNextPing may also be negative depending on the time when the following line is executed by the thread because we check time out before sending a ping.

        to = readTimeout - clientCnxnSocket.getIdleRecv();
      

      In addition, we only ping twice no matter how long the session time out value is. For example, we set session time out = 60mins then we only try ping twice in 40mins window. Therefore, the connection could be dropped by OS after idle time out.

      The issue is causing randomly "connection loss" or "session expired" issues in client side which is bad for applications like HBase.

        Attachments

          Activity

            People

            • Assignee:
              jeffreyz Jeffrey Zhong
              Reporter:
              jeffreyz Jeffrey Zhong
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: