You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (JIRA)" <ji...@apache.org> on 2019/03/28 10:36:00 UTC

[jira] [Created] (IGNITE-11649) Java thin client: ReliableChannel is not so reliable

Aleksey Plekhanov created IGNITE-11649:
------------------------------------------

             Summary: Java thin client: ReliableChannel is not so reliable
                 Key: IGNITE-11649
                 URL: https://issues.apache.org/jira/browse/IGNITE-11649
             Project: Ignite
          Issue Type: Bug
          Components: thin client
            Reporter: Aleksey Plekhanov
            Assignee: Aleksey Plekhanov
             Fix For: 2.8


When only one server address is used ReliableChannel don't recover after failure.

Reproducer:
{code:java}
public void testSingleNodeFailover() throws Exception {
    try (LocalIgniteCluster cluster = LocalIgniteCluster.start(1);
         IgniteClient client = Ignition.startClient(new ClientConfiguration()
             .setAddresses(cluster.clientAddresses().iterator().next()))
    ) {
        ObjectName mbeanName = U.makeMBeanName(Ignition.allGrids().get(0).name(), "Clients", "ClientListenerProcessor");
        ClientProcessorMXBean mxBean = MBeanServerInvocationHandler.newProxyInstance(
            ManagementFactory.getPlatformMBeanServer(), mbeanName, ClientProcessorMXBean.class,true);

        ClientCache<Integer, Integer> cache = client.createCache("cache");

        // Before fail.
        cache.put(0, 0);

        // Fail.
        mxBean.dropAllConnections();

        try {
            cache.put(0, 0);
        }
        catch (Exception expected) {
            // No-op.
        }

        // Recover after fail.
        cache.put(0, 0);
    }
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)