Add additional WLM search settings#20830
Add additional WLM search settings#20830dzane17 wants to merge 3 commits intoopensearch-project:mainfrom
Conversation
PR Reviewer Guide 🔍(Review updated until commit 2f07ae6)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 2f07ae6 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit a5d7602
Suggestions up to commit c7bb91d
|
|
Persistent review updated to latest commit a5d7602 |
|
❌ Gradle check result for a5d7602: 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? |
|
Persistent review updated to latest commit 2f07ae6 |
|
❌ Gradle check result for 2f07ae6: 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: David Zane <davizane@amazon.com>
|
Failed to generate code suggestions for PR |
| * @param value the string to validate | ||
| * @return null if valid, error message if invalid | ||
| */ | ||
| private static String validatePositiveInt(String value) { |
There was a problem hiding this comment.
Let's not reinvent the wheel, I believe we have intSettings where you can specify min value as 1.
There was a problem hiding this comment.
Good point. intSetting is not ideal since I don't need to create a Setting object. I was able to reuse Settings.parseInt(), Settings.parseTimeValue() methods though.
server/src/main/java/org/opensearch/wlm/WorkloadGroupSearchSettings.java
Outdated
Show resolved
Hide resolved
|
❌ Gradle check result for 2b0758e: 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? |
|
Failed to generate code suggestions for PR |
Signed-off-by: David Zane <davizane@amazon.com>
|
Failed to generate code suggestions for PR |
jainankitk
left a comment
There was a problem hiding this comment.
Thanks @dzane17 for raising this PR. At a high level, the management of these settings per workload management group seems like bit of a pain to me. Is it possible to update individual setting value for a workload management group instead of updating the workload management group itself? Also, is it better to call it just settings and have search prefix with the setting name, so that we can have indexing also part of same json object instead of separate one?
|
@jainankitk Right now I think calling it |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20830 +/- ##
=========================================
Coverage 73.19% 73.19%
- Complexity 72592 72614 +22
=========================================
Files 5848 5849 +1
Lines 331991 332077 +86
Branches 47948 47953 +5
=========================================
+ Hits 242986 243069 +83
- Misses 69541 69547 +6
+ Partials 19464 19461 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Adds support for additional workload group search settings. Follow up to #20536
cancel_after_time_intervalEnsures that long-running searches are automatically canceled after a fixed interval, preventing runaway queries from consuming cluster resources indefinitely and protecting other tenants from noisy neighbors.
max_concurrent_shard_requestsLimits how many shard-level requests a single search can execute in parallel, reducing fan-out pressure on the cluster and preventing high-cardinality queries from overwhelming CPU and thread pools.
batched_reduce_sizeControls how many shard results are reduced at a time during the reduce phase, helping to manage memory usage for large fan-out searches and reducing peak heap pressure in multi-tenant environments.
Currently WLM settings act strictly as defaults — if the user has explicitly set a value on the request, it is always preserved. This behavior is subject to change in subsequent PRs (pending discussion).
Related Issues
Part of #20555
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.