-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Introduced new setting search.query.max_query_string_length #19491
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
Introduced new setting search.query.max_query_string_length #19491
Conversation
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
|
❌ Gradle check result for 9a0481e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19491 +/- ##
============================================
+ Coverage 72.99% 73.06% +0.06%
- Complexity 70416 70434 +18
============================================
Files 5708 5708
Lines 322492 322502 +10
Branches 46704 46705 +1
============================================
+ Hits 235412 235645 +233
+ Misses 68161 67832 -329
- Partials 18919 19025 +106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@nibix ( cc: @cwperks , @jainankitk ) Just a thought... this can be a breaking change if users were to move to the latest version. Can we add support where this check can run in a |
Do you mean, monitor_only shall be the default for the beginning? At what point in time would we then globally switch from that default to an "error" default? If we follow clean deprecation rules, that would be only possible in OpenSearch 4, right? Still, as the new setting can be changed using the cluster settings REST API, cluster admins have actually a quite good control over the limit. If they encounter the error message, this actually even mentions the name of the setting. So, even if someone hits the limit, they can very quickly react and change it. |
|
We go either either options.... though I am in favor of having this default Interestingly, a similar resiliency feature, Search backpressure, has In production, the |
…ch-project#19491) * Introduced new setting search.query.max_query_string_length Signed-off-by: Nils Bandener <[email protected]> * Added changelog Signed-off-by: Nils Bandener <[email protected]> * Initialize with proper default to fix unit tests Signed-off-by: Nils Bandener <[email protected]> * Use setting default for static initialization value Signed-off-by: Nils Bandener <[email protected]> --------- Signed-off-by: Nils Bandener <[email protected]>
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.19
# Create a new branch
git switch --create backport/backport-19491-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3677d8f9314bd17b814c29ff539c737e051e4e46
# Push it to GitHub
git push --set-upstream origin backport/backport-19491-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.19Then, create a pull request where the |
|
Creating a manual backport |
…19814) Co-authored-by: Nils Bandener <[email protected]>
Description
This introduces a new cluster wide setting
search.query.max_query_string_lengthwhich can be used to limit the max length of simple, Lucene-style query strings. This provides a simple but robust way to control inputs from potentially untrusted sources.Check List
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.