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

Quota checks break setData in multi transactions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.7.0, 3.8.0
    • 3.7.0, 3.8.0
    • None

    Description

      On a server with enforceQuota=true, multi() transactions containing setData operations can throw NullPointerException during the quota check.

      On the server side, this looks like:

      java.lang.NullPointerException
          at org.apache.zookeeper.server.ZooKeeperServer.checkQuota(ZooKeeperServer.java:2048)
          at org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(PrepRequestProcessor.java:397)
              [...]
      

      On the client side, this is reflected as a MarshallingError:

      org.apache.zookeeper.KeeperException$MarshallingErrorException: KeeperErrorCode = MarshallingError
          at org.apache.zookeeper.KeeperException.create(KeeperException.java:104)
          at org.apache.zookeeper.ZooKeeper.multiInternal(ZooKeeper.java:1758)
              [...]
      

      This is visibly due to the quota check trying to access node data by path from the PrepRequestProcessor without considering the collection of outstandingChanges. I have a patch in the works.

      Attachments

        Issue Links

          Activity

            People

              ztzg Damien Diederen
              ztzg Damien Diederen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h