You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Nikolay Izhikov (Jira)" <ji...@apache.org> on 2020/03/12 08:53:00 UTC
[jira] [Created] (IGNITE-12778) KILL QUERY command doesn't close
already fetched cursor
Nikolay Izhikov created IGNITE-12778:
----------------------------------------
Summary: KILL QUERY command doesn't close already fetched cursor
Key: IGNITE-12778
URL: https://issues.apache.org/jira/browse/IGNITE-12778
Project: Ignite
Issue Type: Bug
Components: sql
Affects Versions: 2.8
Reporter: Nikolay Izhikov
Assignee: Nikolay Izhikov
Fix For: 2.9
KILL QUERY doesn't close already fetched cursor.
Reproducer:
{code:java}
public void testCancelSQLQuery() throws Exception {
startGrids(NODES_CNT);
IgniteEx client = startClientGrid("client");
client.cluster().state(ACTIVE);
IgniteCache<Object, Object> cache = client.getOrCreateCache(
new CacheConfiguration<>(DEFAULT_CACHE_NAME).setIndexedTypes(Integer.class, Integer.class));
for (int i = 0; i < PAGE_SZ * PAGE_SZ; i++)
cache.put(i, i);
SqlFieldsQuery qry = new SqlFieldsQuery("SELECT _KEY, _VAL FROM INTEGER").setSchema("default").setPageSize(10);
Iterator<List<?>> iter = queryProcessor(client).querySqlFields(qry, true).iterator();
assertNotNull(iter.next());
List<List<?>> sqlQries = SqlViewExporterSpiTest.execute(client,
"SELECT * FROM SYS.SQL_QUERIES ORDER BY START_TIME");
assertEquals(2, sqlQries.size());
String qryId = (String)sqlQries.get(0).get(0);
assertEquals("SELECT _KEY, _VAL FROM INTEGER", sqlQries.get(0).get(1));
QueryMXBean qryMBean = getMxBean(client.name(), "Query",
QueryMXBeanImpl.class.getSimpleName(), QueryMXBean.class);
qryMBean.cancelSQL(qryId);
//SqlViewExporterSpiTest.execute(client, "KILL QUERY '" + qryId + "'");
while(iter.hasNext())
assertNotNull(iter.next());
fail("You shouldn't be here!"); //Fails here for now. but should fails on iter.next call.
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)