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

Adds cluster setting to allow caching requests with size>0 in request cache #16484

Merged
merged 10 commits into from
Nov 1, 2024

Conversation

peteralfonsi
Copy link
Contributor

@peteralfonsi peteralfonsi commented Oct 25, 2024

Description

Adds a cluster setting, indices.requests.cache.enable_for_all_requests, which controls whether to allow caching requests with size > 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

  • Functionality includes testing.
  • [N/A] API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Copy link
Member

@dbwiddis dbwiddis left a 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?

@peteralfonsi
Copy link
Contributor Author

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 <petealft@amazon.com>
@dbwiddis
Copy link
Member

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.

It may also need to be updated in the documentation.

@dbwiddis dbwiddis added the backport 2.x Backport to 2.x branch label Oct 25, 2024
@peteralfonsi
Copy link
Contributor Author

Flaky tests: #16056, #14331

Peter Alfonsi and others added 3 commits October 28, 2024 11:51
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Copy link
Contributor

✅ Gradle check result for f54a0cf: SUCCESS

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Copy link
Contributor

✅ Gradle check result for 1d955ef: SUCCESS

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Copy link
Contributor

❌ 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 <petealft@amazon.com>
Copy link
Contributor

❌ 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?

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Performance labels Oct 29, 2024
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Copy link
Contributor

✅ Gradle check result for 99cbb04: SUCCESS

@peteralfonsi
Copy link
Contributor Author

@dbwiddis, I've raised the doc PR, are we otherwise good to merge? Please let me know if you have any other comments.

@dbwiddis dbwiddis merged commit 0363aa7 into opensearch-project:main Nov 1, 2024
40 of 41 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 1, 2024
… cache (#16484)

* Add cluster setting to allow size>0 in request cache

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* Add to changelog

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* addressed dbwiddis's comments

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* make canCacheSizeNonzeroRequests volatile

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* fix changelog merge

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* Changed setting name

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* more renaming

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* fix spotless check

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* rerun gradle check

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

---------

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
Co-authored-by: Peter Alfonsi <petealft@amazon.com>
(cherry picked from commit 0363aa7)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dbwiddis pushed a commit that referenced this pull request Nov 1, 2024
… 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 <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
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 <petealft@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request Search:Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add setting controlling whether to allow size > 0 requests in the request cache
3 participants