ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@gridgain.com>
Subject SqlQuery.pageSize is ignored in replicated cache
Date Thu, 10 Sep 2015 12:38:24 GMT
Hi Sergi,

I was fixing one of the many SQL query tests 
(https://issues.apache.org/jira/browse/IGNITE-613) when found that there 
is an issue in how 'pageSize' parameter is processed by Ignite SQL engine.

Test does the following.

At the beginning it starts 3 server nodes and 1 client node. Fills a 
replicated cache with 1000 entries.

Right after that the following query is executed from the client node

QueryCursor<Cache.Entry<Integer, Integer>> q =
     cache.query(new SqlQuery<Integer, Integer>(Integer.class,"_key >= 0 order by
_key").setPageSize(10));

Then the test gets the first key in order to pre-load the first page:

q.iterator().next().getKey()


However, the iterator loads all 1000 entries ignoring the page size that 
is equal to 10.
I see that the iterator already holds all the entries in a list and 
GridMapQueryExecutor.qryRess map on servers side is empty meaning that 
the whole data was transferred to the client.

Is this a bug or expected behavior?

--
Denis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message