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
- links to