Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-690

CuratorCache fails to load the cache if there are more than 64K child ZNodes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.5.0
    • 5.6.0
    • Recipes
    • None

    Description

      If there are more than 64K nodes in a tree which CuratorCache is watching, the following exception is thrown:

      java.lang.IllegalStateException: Attempt to register more than 65535 parties for org.apache.curator.framework.recipes.cache.CuratorCacheImpl$1@52354867[phase = 0 parties = 65535 arrived = 0]

      As shown in the exception, this is due to the fact that java.util.concurrent.Phaser hard-limits the maximum number of Phaser registrants to 0xfff (64K).

      A note in the Phaser documentation indicates why this limit exist and proposes a solution using Tiered Phasers:

      "Implementation notes: This implementation restricts the maximum number of parties to 65535. Attempts to register additional parties result in IllegalStateException. However, you can and should create tiered phasers to accommodate arbitrarily large sets of participants."

      Attachments

        Issue Links

          Activity

            People

              tison Zili Chen
              Ryan0751 Ryan Ruel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: