Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2359

Route list can be empty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.1.2, 4.0.21
    • 4.1.1, 4.0.20
    • None

    Description

      The list of routes is changed without proper synchronization. One example, I got an empty list when in Infinispan when try to select the route to use:

      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
      	at java.util.ArrayList.get(ArrayList.java:433)
      	at org.infinispan.remoting.transport.jgroups.SiteMasterPickerImpl.pickRoute(SiteMasterPickerImpl.java:26)
      	at org.jgroups.protocols.relay.Relayer.getRoute(Relayer.java:126)
      	at org.jgroups.protocols.relay.RELAY2.route(RELAY2.java:566)
      	at org.jgroups.protocols.relay.RELAY2.down(RELAY2.java:425)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.fork.ForkProtocol.down(ForkProtocol.java:42)
      	at org.jgroups.fork.ForkProtocolStack.down(ForkProtocolStack.java:62)
      	at org.jgroups.fork.ForkChannel.send(ForkChannel.java:222)
      	at org.jgroups.fork.ForkChannel.send(ForkChannel.java:21)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.send(JGroupsTransport.java:1035)
      

      One possible solution is to do a copy of the list before changing it in the view change method invocation (for the bridge)

      Attachments

        Activity

          People

            pruivo@redhat.com Pedro Ruivo
            pruivo@redhat.com Pedro Ruivo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: