ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-2019

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

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.5.2, 3.6.0
    • Component/s: server
    • Labels:
      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/

      1. ZOOKEEPER-2019.patch
        2 kB
        Raul Gutierrez Segales
      2. ZOOKEEPER-2019.patch
        10 kB
        Raul Gutierrez Segales
      3. ZOOKEEPER-2019-ver1.patch
        10 kB
        Alexander Shraer
      4. ZOOKEEPER-2019-v2.patch
        12 kB
        Hongchao Deng
      5. ZOOKEEPER-2019-v3.patch
        12 kB
        Hongchao Deng

        Activity

          People

          • Assignee:
            Raul Gutierrez Segales
            Reporter:
            Raul Gutierrez Segales
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development