Infinispan Caches now support storing persistent views. When these are loaded, these might be loaded with topology ID 0:
If there's no further view changes, the topology ID will remain 0. When a Hot Rod client first connects, it sends its view topology as 0 so that it receives a newly installed topology, but if the topology is already 0 in the server, the server won't send the installed topology, even though it should be newer than having no topology.
We should start numbering topologies in server starting from 1 instead. That avoids this issue. This is easier than forcing clients to send -1 as initial topology because the topology ID is currently defined as VInt that can only 0 or positive number.
Also, some extra log messages indicating that the cache topology installed comes from persisted state would be handy for debugging.