ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Plekhanov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-11670) Java thin client: Queries are inconsistent in case of failover
Date Tue, 02 Apr 2019 12:42:02 GMT
Aleksey Plekhanov created IGNITE-11670:

             Summary: Java thin client: Queries are inconsistent in case of failover
                 Key: IGNITE-11670
                 URL: https://issues.apache.org/jira/browse/IGNITE-11670
             Project: Ignite
          Issue Type: Bug
          Components: thin client
            Reporter: Aleksey Plekhanov

When a thin client does failover and switches to a new server, open cursors become inconsistent
and silently returns the wrong result.


    public void testQueryFailover() throws Exception {
        try (LocalIgniteCluster cluster = LocalIgniteCluster.start(1);
             IgniteClient client = Ignition.startClient(new ClientConfiguration()
        ) {
            ObjectName mbeanName = U.makeMBeanName(Ignition.allGrids().get(0).name(), "Clients",

            ClientProcessorMXBean mxBean = MBeanServerInvocationHandler.newProxyInstance(
                ManagementFactory.getPlatformMBeanServer(), mbeanName, ClientProcessorMXBean.class,

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

            cache.put(0, 0);
            cache.put(1, 1);

            Query<Cache.Entry<Integer, String>> qry = new ScanQuery<Integer,

            try (QueryCursor<Cache.Entry<Integer, String>> cur = cache.query(qry))
                int cnt = 0;

                for (Iterator<Cache.Entry<Integer, String>> it = cur.iterator();
it.hasNext(); it.next()) {

                    if (cnt == 1)

                assertEquals(2, cnt);

This message was sent by Atlassian JIRA

View raw message