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

HotRod Client - TcpTransportFactory - update topology issue with multiple caches

    XMLWordPrintable

Details

    • Hide

      Configuration :

      • Server side :
        • 3 distributed-cache into a cache container
        • 3 nodes (nodeA, nodeB, nodeC).
      • Client side :
        • 1 remote cache manager with TcpTransportFactory and RoundRobinBalancingStrategy.
        • 2 infinispan-server nodes (nodeA, nodeB) configured into the server list

      Everything is running except nodeC

      1. I start a new infinispan-server (nodeC)
      2. Only the RoundRobingBalancingStrategy associated with the 1st cache declared is updated with the new infinispan-server nodeC
      3. I stop the nodeB
      4. Only the RoundRobinBalancingStrategy associated with the first cache declared is updated
      5. The RoundRobinStrategies associated with the 2nd and 3rd are not updated. When quering on these cache, the nodeB is "excluded" and it remains only one node (nodeA).
      6. I stop nodeA
      7. When quering the 1st cache, the nodeC is requested. When querying the 2nd and the 3rd caches, I got "org.infinispan.client.hotrod.exceptions.TransportException:: Could not fetch transport"

      Show
      Configuration : Server side : 3 distributed-cache into a cache container 3 nodes (nodeA, nodeB, nodeC). Client side : 1 remote cache manager with TcpTransportFactory and RoundRobinBalancingStrategy. 2 infinispan-server nodes (nodeA, nodeB) configured into the server list Everything is running except nodeC 1. I start a new infinispan-server (nodeC) 2. Only the RoundRobingBalancingStrategy associated with the 1st cache declared is updated with the new infinispan-server nodeC 3. I stop the nodeB 4. Only the RoundRobinBalancingStrategy associated with the first cache declared is updated 5. The RoundRobinStrategies associated with the 2nd and 3rd are not updated. When quering on these cache, the nodeB is "excluded" and it remains only one node (nodeA). 6. I stop nodeA 7. When quering the 1st cache, the nodeC is requested. When querying the 2nd and the 3rd caches, I got "org.infinispan.client.hotrod.exceptions.TransportException:: Could not fetch transport"

    Description

      After debugging :
      In TcpTransportFactory, the topologyInfo is global (whatever the number of caches), the balancing strategies are defined by cache.

      • For the 1st cache, the servers list is updated (org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory#updateServers(java.util.Collection<java.net.SocketAddress>, byte[], boolean), the topologyInfo is updated.
        • The new servers list is returned only if servers have been added.
        • As this list is not empty, the balancy strategy for the first cache is updated.
      • For the other caches, the server list is updated by calling the same "updateServers" method, the "updateTopologyInfo" method is called
        • But as the topologyInfo has been already updated for the 1st cache, it returns "Collections.emptyList();"
        • The associated balancing strategies are not updated.
      public void updateServers(Collection<SocketAddress> newServers, byte[] cacheName, boolean quiet) {
            synchronized (lock) {
               Collection<SocketAddress> servers = updateTopologyInfo(newServers, quiet);
              if (!servers.isEmpty()) {
                  FailoverRequestBalancingStrategy balancer = getOrCreateIfAbsentBalancer(cacheName);
                  balancer.setServers(servers);
               }
            }
         }
      

      Attachments

        Issue Links

          Activity

            People

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              jflartaud_jira Jean-Francois LARTAUD (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: