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

ZK client hangs when using a function not available on the server.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.2, 3.3.5
    • Fix Version/s: 3.4.6, 3.5.0
    • Component/s: server
    • Labels:
      None
    • Environment:

      all

    • Hadoop Flags:
      Reviewed

      Description

      This happens for example when using zk#multi with a 3.4 client but a 3.3 server.

      The issue seems to be on the server side: the servers drops the packets with an unknown OpCode in ZooKeeperServer#submitRequest

      public void submitRequest(Request si) {
          // snip
          try {
              touch(si.cnxn);
              boolean validpacket = Request.isValid(si.type); // ===> Check on case OpCode.*
              if (validpacket) {
                  // snip
              } else {
                  LOG.warn("Dropping packet at server of type " + si.type);
                  // if invalid packet drop the packet.
              }
          } catch (MissingSessionException e) {
              if (LOG.isDebugEnabled()) {
                  LOG.debug("Dropping request: " + e.getMessage());
              }
          }
      }
      

      The solution discussed in ZOOKEEPER-1381 would be to get an exception on the client side then & close the session.

        Attachments

        1. 1495.br33.v3.patch
          6 kB
          Nicolas Liochon
        2. ZOOKEEPER-1495_branch34.patch
          7 kB
          Skye Wanderman-Milne
        3. ZOOKEEPER-1495.2.patch
          7 kB
          Edward Ribeiro
        4. ZOOKEEPER-1495.patch
          7 kB
          Skye Wanderman-Milne

          Issue Links

            Activity

              People

              • Assignee:
                nkeywal Nicolas Liochon
                Reporter:
                nkeywal Nicolas Liochon
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: