Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12778

KILL QUERY command doesn't close already fetched cursor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 2.8
    • 2.9
    • sql
    • None
    • Docs Required, Release Notes Required

    Description

      KILL QUERY doesn't close already fetched cursor.
      Reproducer:

          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));
      
              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.
      
      

      Attachments

        Issue Links

          Activity

            People

              nizhikov Nikolay Izhikov
              nizhikov Nikolay Izhikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: