Denis,

It appears that in current implementation the page size means number of
rows which will be sent in a single message between nodes but it does not
define how many pages will be loaded. I agree that it is kind of unexpected
behavior but this is not that easy to fix.
We need to add lazy mode to H2 database, because now it executes SQL
queries actively and fetches all the results from remote nodes.

Sergi

2015-09-11 10:44 GMT+03:00 Denis Magda <dma...@gridgain.com>:

> Good,
>
> Sergi I've merged the test to 1.4 branch and assigned IGNITE-613 on you.
>
> When you fix the issue please validate the fix with this test and unmute
> the test by removing 'fail(...)' statement at the beginning of its body.
>
>
> --
> Denis
>
>
> On 9/10/2015 4:00 PM, Sergi Vladykin wrote:
>
>> Something like this could happen because replicated cache is incorrectly
>> expected to have the whole dataset locally.
>> I will take a look .
>>
>> Sergi
>>
>> 2015-09-10 15:38 GMT+03:00 Denis Magda <dma...@gridgain.com>:
>>
>> 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
>>>
>>>
>

Reply via email to