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

jute.maxbuffer is ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.5.2
    • 3.5.3, 3.6.0
    • None
    • None

    Description

      In ClientCnxnSocket.java the parsing of the system property is erroneous:

      packetLen = Integer.getInteger(
        clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER),
        ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT
      );

      Javadoc of Integer.getInteger states "The first argument is treated as the name of a system property", whereas here the value of the property is passed.

      Instead I believe the author meant to write something like:

      packetLen = Integer.parseInt(
        clientConfig.getProperty(
          ZKConfig.JUTE_MAXBUFFER,
          String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT)
        )
      );

      Attachments

        1. ZOOKEEPER-2517.patch
          0.9 kB
          Benjamin Jaton
        2. ZOOKEEPER-2517-01.patch
          4 kB
          Mohammad Arshad
        3. ZOOKEEPER-2517-02.patch
          4 kB
          Mohammad Arshad
        4. ZOOKEEPER-2517-03.patch
          5 kB
          Mohammad Arshad
        5. ZOOKEEPER-2517-04.patch
          8 kB
          Mohammad Arshad

        Issue Links

          Activity

            People

              arshad.mohammad Mohammad Arshad
              benjamin.jaton Benjamin Jaton
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: