Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default value of plugins.query.size_limit to MAX_RESULT_WINDOW (10000) #2860

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Jul 25, 2024

Description

The plugins.query.size_limit configure the maximum amount of rows returned by query. The default value is 200 which inherited from the legacy settings opendistro.query.size_limit. 200 is insufficient for many use cases which results incorrect outcomes. Check #2859 for more details.

This PR changes the default value of plugins.query.size_limit to the default value of index.max_result_window (10000 by default)

Issues Resolved

Resolves #2859

Check List

  • [-] New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • [-] New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…NDOW (10000)

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
@@ -90,7 +91,7 @@ public class OpenSearchSettings extends Settings {
public static final Setting<?> QUERY_SIZE_LIMIT_SETTING =
Setting.intSetting(
Key.QUERY_SIZE_LIMIT.getKeyValue(),
LegacyOpenDistroSettings.QUERY_SIZE_LIMIT_SETTING,
IndexSettings.MAX_RESULT_WINDOW_SETTING,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot what does this fallbackSetting argument mean. What's the difference between this and changing the default value 200 in LegacyOpenDistroSettings?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In don't think we should touch the default value of any LegacyOpenDistroSettings, although the effects are same.

Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@dai-chen dai-chen added the enhancement New feature or request label Jul 30, 2024
@LantaoJin LantaoJin merged commit aa7a690 into opensearch-project:main Jul 31, 2024
16 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 31, 2024
…NDOW (10000) (#2860)

* Change the default value of plugins.query.size_limit to MAX_RESULT_WINDOW (10000)

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix ut

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix spotless

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@amazon.com>
(cherry picked from commit aa7a690)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
LantaoJin pushed a commit that referenced this pull request Aug 1, 2024
…NDOW (10000) (#2860) (#2877)

* Change the default value of plugins.query.size_limit to MAX_RESULT_WINDOW (10000)



* fix ut



* fix spotless



---------


(cherry picked from commit aa7a690)

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
manasvinibs pushed a commit to manasvinibs/sql that referenced this pull request Aug 14, 2024
…NDOW (10000) (opensearch-project#2860)

* Change the default value of plugins.query.size_limit to MAX_RESULT_WINDOW (10000)

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix ut

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix spotless

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@amazon.com>
jzonthemtn pushed a commit to jzonthemtn/sql that referenced this pull request Aug 28, 2024
…NDOW (10000) (opensearch-project#2860)

* Change the default value of plugins.query.size_limit to MAX_RESULT_WINDOW (10000)

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix ut

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix spotless

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Change the default value of plugins.query.size_limit to 10000 (MAX_RESULT_WINDOW)
3 participants