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

Enforce the quota limit

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • java client, server
    • None

    Description

      Currently in ZooKeeper when quota limit exceeds, a warning is logged. There are many user scenarios where it is desired to throw exception in case quota limits exceed.
      We should make it configurable whether to throw exception or just log the warning when quota limits exceed.
      Implementation:
      add new properties

      enforce.number.quota
      enforce.byte.quota
      

      add new error codes

      KeeperException.Code.NUMBERQUOTAEXCEED
      KeeperException.Code.BYTEQUOTAEXCEED
      

      add new exception

      KeeperException.NumberQuotaExceedException
      KeeperException.ByteQuotaExceedException
      

      Basic Scenarios:

      1. If enforce.number.quota=true and number quota exceed, then server should send NUMBERQUOTAEXCEED error code and client should throw NumberQuotaExceedException
      2. If enforce.byte.quota=true and byte quota exceed, then server should send BYTEQUOTAEXCEED error code and client should throw ByteQuotaExceedException

      Impacted APIs:
      create
      setData

      Attachments

        Issue Links

          Activity

            People

              arshad.mohammad Mohammad Arshad
              arshad.mohammad Mohammad Arshad
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: