[jira] [Commented] (IGNITE-11670) Java thin client: Queries are inconsistent in case of failover
[ https://issues.apache.org/jira/browse/IGNITE-11670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16848816#comment-16848816 ] Amelchev Nikita commented on IGNITE-11670: -- [~alex_pl], Your changes look good to me. > 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 >Affects Versions: 2.7 >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > When a thin client does failover and switches to a new server, open cursors > become inconsistent and silently returns the wrong result. > Reproducer: > {code:java} > public void testQueryFailover() 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.class.getSimpleName()); > ClientProcessorMXBean mxBean = > MBeanServerInvocationHandler.newProxyInstance( > ManagementFactory.getPlatformMBeanServer(), mbeanName, > ClientProcessorMXBean.class, true); > ClientCache cache = client.createCache("cache"); > cache.put(0, 0); > cache.put(1, 1); > Query> qry = new ScanQuery String>().setPageSize(1); > try (QueryCursor> cur = > cache.query(qry)) { > int cnt = 0; > for (Iterator> it = > cur.iterator(); it.hasNext(); it.next()) { > cnt++; > if (cnt == 1) > mxBean.dropAllConnections(); > } > assertEquals(2, cnt); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11670) Java thin client: Queries are inconsistent in case of failover
[ https://issues.apache.org/jira/browse/IGNITE-11670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16848802#comment-16848802 ] Aleksey Plekhanov commented on IGNITE-11670: Patch is ready. [~NSAmelchev] could you please have a look? > 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 >Affects Versions: 2.7 >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > When a thin client does failover and switches to a new server, open cursors > become inconsistent and silently returns the wrong result. > Reproducer: > {code:java} > public void testQueryFailover() 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.class.getSimpleName()); > ClientProcessorMXBean mxBean = > MBeanServerInvocationHandler.newProxyInstance( > ManagementFactory.getPlatformMBeanServer(), mbeanName, > ClientProcessorMXBean.class, true); > ClientCache cache = client.createCache("cache"); > cache.put(0, 0); > cache.put(1, 1); > Query> qry = new ScanQuery String>().setPageSize(1); > try (QueryCursor> cur = > cache.query(qry)) { > int cnt = 0; > for (Iterator> it = > cur.iterator(); it.hasNext(); it.next()) { > cnt++; > if (cnt == 1) > mxBean.dropAllConnections(); > } > assertEquals(2, cnt); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11670) Java thin client: Queries are inconsistent in case of failover
[ https://issues.apache.org/jira/browse/IGNITE-11670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16847292#comment-16847292 ] Ignite TC Bot commented on IGNITE-11670: {panel:title=-- Run :: Basic Tests: No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel} [TeamCity *-- Run :: Basic Tests* Results|https://ci.ignite.apache.org/viewLog.html?buildId=3924513buildTypeId=IgniteTests24Java8_RunBasicTests] > 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 >Affects Versions: 2.7 >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > When a thin client does failover and switches to a new server, open cursors > become inconsistent and silently returns the wrong result. > Reproducer: > {code:java} > public void testQueryFailover() 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.class.getSimpleName()); > ClientProcessorMXBean mxBean = > MBeanServerInvocationHandler.newProxyInstance( > ManagementFactory.getPlatformMBeanServer(), mbeanName, > ClientProcessorMXBean.class, true); > ClientCache cache = client.createCache("cache"); > cache.put(0, 0); > cache.put(1, 1); > Query> qry = new ScanQuery String>().setPageSize(1); > try (QueryCursor> cur = > cache.query(qry)) { > int cnt = 0; > for (Iterator> it = > cur.iterator(); it.hasNext(); it.next()) { > cnt++; > if (cnt == 1) > mxBean.dropAllConnections(); > } > assertEquals(2, cnt); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)