Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7115

KeyAffinityService blocks Infinispan's topology change thread

XMLWordPrintable

      Infinispan's default KeyAffinityService implementation has a number of problems:

      1. Its topology change listener is blocking.  This can cause deadlocks in recent Infinispan releases, which requires listeners to be non-blocking.
      2. Its getKeyForAddress(...) method throws an ISE if the target address does not own any segments.  This can be the case if state transfer fails, or if a node is configured with zero capacity.  We don't currently handle this IAE.  Ideally, this condition should generate a random key.
      3. It uses a single worker thread to generate keys for interested members.  Consequently, it must offer keys with a timeout, lest it starve generation of keys for other members.  This causes results in overly high CPU utilization when all queues are full.
      4. getKeyForAddress(...) blocks during topology changes, which ultimately blocks request threads while Infinispan repopulates its key queues.
      5. It flushes it key queues unnecessarily during intermediate state transfer phases.

      Given that EAP's use case for KeyAffinityService only cares about generating keys that hash locally, we can create a custom implementation optimized for our use case.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: