0 Replies Latest reply on Aug 25, 2010 9:52 AM by jmesnil

    HA client nodes notification

    jmesnil

      I am adding tests to check that HA clients are properly notified of the cluster topology changes and can connect to nodes in any case.

      I have a test with a symmetric cluster of 5 nodes (#0 to #4)

      The HA client's server locator has a single transport configuration to connect to #0.

      When a session factory is created, the server locator will connect to #0 and this node will send back the full cluster topology.

      the client's topology now knows about all the nodes in the cluster.

      I then stop node #0.

      The client will be disconnected but its topology is not notified that #0 is down.

      When I tried to create a session, it fails (as expected).

       

      So I create another session factory from the server locator, it rounds-robin the topology's connectors and connect to node #1.

      node #1 will reply by sending its topology (composed of #1, #2, #3 and #4)

      However the client topology still thinks that node #0 is up when it is not.

       

      I think we also need to notify the server locator that a node is down when a client session factory is receiving a DISCONNECT packet warning that the server is shutting down.

      I'd need to add the nodeID to the DISCONNECT packet and notify the server locator when the close executor is executed.