Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-3092

AutoNodeSelector throws ArrayIndexOutOfBoundsException when indexName is long

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When hibernate search is used (with capedwarf for example), adding a fourth server to the cluster crashes infinispan.

      I've narrowed the problem down to org.hibernate.search.backend.impl.jgroups.AutoNodeSelector:78

      Here the following formula is used to calculate an array index

      int selectionRange = members.size() - 1;
      int selected = ( indexName.hashCode() % selectionRange) + 1;

      if indexname is long (like "default_taskworker-java__com.google.appengine.api.datastore.Entity")
      the hashcode becomes negative due to integer overflow, resulting in a negative index

              sgrinove Sanne Grinovero (Inactive)
              danamin Wouter De Borger (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: