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

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

Closed
LantaoJin opened this issue Jul 25, 2024 · 0 comments · Fixed by #2860
Closed
Assignees
Labels
enhancement New feature or request

Comments

@LantaoJin
Copy link
Member

LantaoJin commented Jul 25, 2024

Is your feature request related to a problem?

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:

On the other hand, plugins.query.size_limit is not the only threshold to protect the service from OOM issue. plugins.query.memory_limit which default value is 85% could be another gatekeeper.
In OpenSearch, the maximum result for searches on index controlled by index.max_result_window, which is 10000 by default. That is the suggested new default value of plugins.query.size_limit.

Goals

  • Mitigate the impacts caused by insufficient default settings. Be aware in the vast majority of cases, users will not adjust the default value.

Non-Goals

What solution would you like?

Change the default value of plugins.query.size_limit to the default value of index.max_result_window (10000 by default)

What alternatives have you considered?

#703 (comment) proposed a more complex solution that leverage scrollRequest to handle the case which requests docs more than 10000.
E.g. source=index | head 11000 returns 11000 rows using scroll
but source=index | fields a,b | head 11000 still returns 200 rows

Do you have any additional context?

  1. Plugin setting: https://github.com/opensearch-project/sql/blob/main/docs/user/admin/settings.rst#plugins-query-size-limit
  2. Current limitation: https://github.com/opensearch-project/sql/blob/main/docs/user/dql/basics.rst#limitation
@LantaoJin LantaoJin added enhancement New feature or request untriaged and removed untriaged labels Jul 25, 2024
@LantaoJin LantaoJin changed the title [RFC] Increase the default value of plugins.query.size_limit to 10000 [RFC] Change the default value of plugins.query.size_limit to 10000 (MAX_RESULT_WINDOW_SETTING) Jul 25, 2024
@LantaoJin LantaoJin changed the title [RFC] Change the default value of plugins.query.size_limit to 10000 (MAX_RESULT_WINDOW_SETTING) [RFC] Change the default value of plugins.query.size_limit to 10000 (MAX_RESULT_WINDOW) Jul 25, 2024
@LantaoJin LantaoJin self-assigned this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant