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

Unhandled exception when setting invalid limits data in /zookeeper/quota/some/path/zookeeper_limits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • server
    • None

    Description

      If you have quotas properly set for a given path, i.e.:

      create /zookeeper/quota/test/zookeeper_limits 'count=1,bytes=100'
      create /zookeeper/quota/test/zookeeper_stats 'count=1,bytes=100'
      

      and then you update the limits znode with bogus data, i.e.:

      set /zookeeper/quota/test/zookeeper_limits ''
      

      you'll crash the cluster because IllegalArgumentException isn't handled when dealing with quotas znodes:

      https://github.com/apache/zookeeper/blob/ZOOKEEPER-823/src/java/main/org/apache/zookeeper/server/DataTree.java#L379
      https://github.com/apache/zookeeper/blob/ZOOKEEPER-823/src/java/main/org/apache/zookeeper/server/DataTree.java#L425

      We should handle IllegalArgumentException. Optionally, we should also throw BadArgumentsException from PrepRequestProcessor.

      Review Board: https://reviews.apache.org/r/25968/

      Attachments

        1. ZOOKEEPER-2019-ver1.patch
          10 kB
          Alexander Shraer
        2. ZOOKEEPER-2019-v3.patch
          12 kB
          Hongchao Deng
        3. ZOOKEEPER-2019-v2.patch
          12 kB
          Hongchao Deng
        4. ZOOKEEPER-2019.patch
          2 kB
          Raúl Gutiérrez Segalés
        5. ZOOKEEPER-2019.patch
          10 kB
          Raúl Gutiérrez Segalés

        Activity

          People

            rgs Raúl Gutiérrez Segalés
            rgs Raúl Gutiérrez Segalés
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: