Skip to content

IGNITE-29191 Fix local IndexQuery ignoring setLimit() - #13735

Open
rezataroosheh wants to merge 1 commit into
apache:masterfrom
rezataroosheh:IGNITE-29191
Open

rezataroosheh wants to merge 1 commit into
apache:masterfrom
rezataroosheh:IGNITE-29191

Conversation

@rezataroosheh

@rezataroosheh rezataroosheh commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

A local IndexQuery (setLocal(true)) now respects setLimit(): it returns at most limit entries. Queries without a limit are not affected.

Why

The limit was applied only on the distributed path, in the query future on the reducer side. The local path (GridCacheQueryManager#indexQueryLocal) never read it, so a local query with setLimit(3) returned every matching entry. It was reported on the dev list.

Tests

New IndexQueryLimitTest#testLocalQueryLimit: a local query with setLimit(3) returns 3 entries. It fails without the fix (it returns all 10000).

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see tab PR Check at TC.Bot - Instance 1 or TC.Bot - Instance 2)

Notes

If you need any help, please email dev@ignite.apache.org or ask any advice on https://the-asf.slack.com #ignite channel.

@rezataroosheh
rezataroosheh marked this pull request as ready for review October 22, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant