-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Adds cluster setting to allow caching requests with size>0 in request cache #16484
Adds cluster setting to allow caching requests with size>0 in request cache #16484
Conversation
Signed-off-by: Peter Alfonsi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is adding a new setting not something that should be documented or added in the change log?
My mistake, I thought this was only for larger changes. I'll add it to the changelog. |
Signed-off-by: Peter Alfonsi <[email protected]>
It may also need to be updated in the documentation. |
server/src/main/java/org/opensearch/indices/IndicesRequestCache.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/IndicesService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/IndicesService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Peter Alfonsi <[email protected]>
Signed-off-by: Peter Alfonsi <[email protected]>
Signed-off-by: Peter Alfonsi <[email protected]>
Signed-off-by: Peter Alfonsi <[email protected]>
server/src/main/java/org/opensearch/indices/IndicesService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/IndicesRequestCache.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Peter Alfonsi <[email protected]>
❌ Gradle check result for fe3818a: 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: Peter Alfonsi <[email protected]>
❌ Gradle check result for c37b2bb: 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: Peter Alfonsi <[email protected]>
… cache (#16484) * Add cluster setting to allow size>0 in request cache Signed-off-by: Peter Alfonsi <[email protected]> * Add to changelog Signed-off-by: Peter Alfonsi <[email protected]> * addressed dbwiddis's comments Signed-off-by: Peter Alfonsi <[email protected]> * make canCacheSizeNonzeroRequests volatile Signed-off-by: Peter Alfonsi <[email protected]> * fix changelog merge Signed-off-by: Peter Alfonsi <[email protected]> * Changed setting name Signed-off-by: Peter Alfonsi <[email protected]> * more renaming Signed-off-by: Peter Alfonsi <[email protected]> * fix spotless check Signed-off-by: Peter Alfonsi <[email protected]> * rerun gradle check Signed-off-by: Peter Alfonsi <[email protected]> --------- Signed-off-by: Peter Alfonsi <[email protected]> Signed-off-by: Peter Alfonsi <[email protected]> Co-authored-by: Peter Alfonsi <[email protected]> (cherry picked from commit 0363aa7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
… cache (#16484) (#16540) * Add cluster setting to allow size>0 in request cache * Add to changelog * addressed dbwiddis's comments * make canCacheSizeNonzeroRequests volatile * fix changelog merge * Changed setting name * more renaming * fix spotless check * rerun gradle check --------- (cherry picked from commit 0363aa7) Signed-off-by: Peter Alfonsi <[email protected]> Signed-off-by: Peter Alfonsi <[email protected]> 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> Co-authored-by: Peter Alfonsi <[email protected]>
Description
Adds a cluster setting,
indices.requests.cache.enable_for_all_requests
, which controls whether to allow caching requests withsize > 0
in the request cache. Defaults to false, matching previous behavior.Since tiered caching can make the request cache significantly larger, it can make sense to cache these requests. This setting probably shouldn't be turned on if tiered caching isn't in use.
Tested in UT, IT, and manually tested turning the cluster setting on and off while checking whether requests were cached.
Related Issues
Resolves #16485
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.