-
Bug
-
Resolution: Done
-
Major
-
8.2.2.Final, 9.0.0.Final
-
None
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); } } }
- causes
-
JDG-645 Update topology issue with multiple caches
- Closed