[
https://issues.apache.org/jira/browse/IGNITE-29191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131019#comment-18131019
]
Ignite TC Bot commented on IGNITE-29191:
----------------------------------------
{panel:title=Branch: [pull/13735/head] Base: [master] : No blockers
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/13735/head] Base: [master] : New Tests
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Index Query API{color} [[tests
1|https://ci2.ignite.apache.org/viewLog.html?buildId=9435194]]
* {color:#013220}IndexQueryTestSuite: IndexQueryLimitTest.testLocalQueryLimit -
PASSED{color}
{panel}
[TeamCity *--> Run :: All*
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=9435295&buildTypeId=IgniteTests24Java8_RunAll]
{color:#ffffff}tcbot-analysis-comment chainBuildId=9435295
rerunBuildIds=none{color}
> Local IndexQuery ignores setLimit()
> ------------------------------------
>
> Key: IGNITE-29191
> URL: https://issues.apache.org/jira/browse/IGNITE-29191
> Project: Ignite
> Issue Type: Bug
> Reporter: Reza Taroosheh
> Assignee: Reza Taroosheh
> Priority: Major
> Fix For: 2.19
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> h3. Summary
> {{IndexQuery#setLimit}} is applied to a distributed query, but a query run
> with {{setLocal(true)}} returns every matching row.
> A user reported this on the dev list, with a reproducer. Reproduces on 2.17,
> 2.18, and current master.
> h3. Steps
> A REPLICATED cache with 10,000 rows, and an {{IndexQuery}} with
> {{setLimit(3)}} and {{{}setLocal(true){}}}:
> {code:java}
> IndexQuery<Long, Person> qry = new IndexQuery<Long, Person>(Person.class,
> IDX).setLimit(3);
> qry.setLocal(true);
> assertEquals(3, crd.cache(CACHE).query(qry).getAll().size());
> {code}
> *Expected:* 3 rows.
> *Actual:* {{expected:<3> but was:<10000>}}
> h3. Cause
> {{IgniteCacheProxyImpl#query}} passes the limit to the {{CacheQuery}} for
> both paths. The distributed path applies it in
> {{{}GridCacheQueryFutureAdapter{}}}, but the local path,
> {{{}GridCacheQueryManager#indexQueryLocal{}}}, never reads
> {{{}qry.limit(){}}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)