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

Hot Rod client uses "greater than" for comparison but topology ID resets on full cluster restart

XMLWordPrintable

    • Hide
      1. Start an Infinispan cluster and a Hot Rod client application. Enable debug logging on the client.
      2. Restart one of the servers in the cluster a few times, observing that the topology changes are being accepted by the client.
      3. Stop the entire Infinispan cluster without stopping the Hot Rod client application.
      4. Start the Infinispan cluster.

      Expected behavior: Hot Rod client receives the topology update from the newly-restarted cluster.

      Actual behavior: client does not accept the topology update, because the topology ID is less than the ID sent during step (2).

      Show
      Start an Infinispan cluster and a Hot Rod client application. Enable debug logging on the client. Restart one of the servers in the cluster a few times, observing that the topology changes are being accepted by the client. Stop the entire Infinispan cluster without stopping the Hot Rod client application. Start the Infinispan cluster. Expected behavior: Hot Rod client receives the topology update from the newly-restarted cluster. Actual behavior: client does not accept the topology update, because the topology ID is less than the ID sent during step (2).

      The Hot Rod client will update its topology if the topology ID on the sever is greater than the topology ID it's using. If the entire server cluster is shut down and started, the topology ID will restart at 1, and will be less than the topology ID that the client has from before the restart. Therefore clients will fail to update their topologies when a full server restart occurs.

      The fix would be to use "not equal" rather than "greater than" for the topology ID comparison, and possibly using an ID generated from the CHA segments rather than a simple ID. 

              wburns@redhat.com Will Burns
              tterris@redhat.com Trevor Terris
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: