-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Introduced monitoring mode for query string query max length. #19539
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
base: main
Are you sure you want to change the base?
Introduced monitoring mode for query string query max length. #19539
Conversation
Signed-off-by: Lukasz Soszynski <[email protected]>
ac1cdd7
to
377eca4
Compare
❌ Gradle check result for 377eca4: 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? |
Tagging @cwperks , @jainankitk for a review. |
@kkhatua I'm not really in favor of one-off settings like this. The max-length setting introduced in #19491 is already changeable dynamically. What do you think about making any responses that exceed the configured max length to be actionable? i.e. the response should not just be that the request fails, but state the reason for failure and how to adjust the max length setting. This is from one of the tests:
Maybe we can specify the setting name in that message? |
yeah having a failure reason would be useful. |
Agree on providing a failure reason with the settings to modify, similar to other settings. Tagging @jainankitk to review. Would be good to have this for 3.3 release, but it's not a must. |
Signed-off-by: Craig Perkins <[email protected]>
Fixed the conflicts due to the CHANGELOG being cleared. The content of this change looks good to me. I was comparing this more to XContentConstraint where there is a max enforced in the Jackson library itself. Similar to Lucene BoolQuery with 1024 max clause count:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19539 +/- ##
============================================
+ Coverage 73.05% 73.09% +0.04%
+ Complexity 70627 70608 -19
============================================
Files 5723 5723
Lines 323489 323502 +13
Branches 46851 46852 +1
============================================
+ Hits 236311 236468 +157
+ Misses 68174 67959 -215
- Partials 19004 19075 +71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
The PR introduces "query string query" monitoring mode. The mode is by default disabled. If the system administrator enables the mode (using the configuration property
search.query.max_query_string_length_monitor_only
), then the OS executes queries that exceed the max length limit and logs an additional warning message.The PR is related to the discussion
Related Issues
#19491 (comment)
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.