Skip to content

[Backport 2.x] [Bugfix] [Tiered Caching] Fixes issues when integrating tiered cache with disk cache#13801

Merged
sohami merged 12 commits intoopensearch-project:2.xfrom
peteralfonsi:backport/backport-13784-to-2.x
Jun 5, 2024
Merged

[Backport 2.x] [Bugfix] [Tiered Caching] Fixes issues when integrating tiered cache with disk cache#13801
sohami merged 12 commits intoopensearch-project:2.xfrom
peteralfonsi:backport/backport-13784-to-2.x

Conversation

@peteralfonsi
Copy link
Copy Markdown
Contributor

Original PR: #13784

Description

Fixes issues that prevented us from using the tiered spillover cache with EhcacheDiskCache as the disk cache:

  • TSC was not correctly passing serializers to its disk cache, broken since 2.14
  • Ehcache plugin was missing slf4j dependency in main, but had it in 2.x branch
  • Ehcache plugin was missing permissions and wasn't properly using AccessController.doPrivileged to run its code that required those permissions. Broken since 2.13

These issues weren't caught in automated testing since the TSC lives in a module and the disk cache lives in a separate plugin, so we couldn't IT them together and the issues were only found during manual testing. Confirmed that after these fixes are in place, we can use the feature as desired using:

./gradlew run -Dtests.opensearch.opensearch.experimental.feature.pluggable.caching.enabled=true -Dtests.opensearch.indices.requests.cache.store.name=tiered_spillover -Dtests.opensearch.indices.requests.cache.tiered_spillover.onheap.store.name=opensearch_onheap -Dtests.opensearch.indices.requests.cache.tiered_spillover.disk.store.name=ehcache_disk -Dtests.opensearch.indices.requests.cache.tiered_spillover.disk.store.policies.took_time.threshold=0ms -PinstalledPlugins="['cache-ehcache']" -Dtests.opensearch.indices.requests.cache.ehcache_disk.storage.path="/Volumes/workplace/opensearch/OpenSearch/build/testclusters/runTask-0/data/nodes/0/indices/request_cache"

I've bundled these bugfixes together, as we can't really confirm any one of the fixes works until the manual test runs correctly, which requires all of the fixes.

Related Issues

Part of tiered caching

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
      - [N/A] API changes companion pull request created.
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
    [N/A] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
    [N/A] Public documentation issue/PR created

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.

…with disk cache (opensearch-project#13784)

---------

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Co-authored-by: Peter Alfonsi <petealft@amazon.com>
(cherry picked from commit e67ced7)
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for ad77481: 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?

@peteralfonsi
Copy link
Copy Markdown
Contributor Author

Flaky tests:
#10558
#13473

@peteralfonsi peteralfonsi changed the title [Backport 2.x] [Tiered Caching] Fixes issues when integrating tiered cache with disk cache [Backport 2.x] [Bugfix] [Tiered Caching] Fixes issues when integrating tiered cache with disk cache May 24, 2024
@peteralfonsi
Copy link
Copy Markdown
Contributor Author

@msfroh @dblock @VachaShah @sohami Would anyone be able to merge this backport PR?

@dblock
Copy link
Copy Markdown
Member

dblock commented Jun 3, 2024

@msfroh @dblock @VachaShah @sohami Would anyone be able to merge this backport PR?

We do need a passing build. When you see a flaky test, force push an update to re-trigger CI. I did click the button in the meantime, but you can self-serve faster ;)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 3, 2024

❌ Gradle check result for ad77481: 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?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 4, 2024

❌ Gradle check result for 2aed568: null

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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 4, 2024

✅ Gradle check result for 4700e37: SUCCESS

@peteralfonsi
Copy link
Copy Markdown
Contributor Author

@dblock I think I finally have a green build with DCO, would you be able to reapprove and merge?

Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 5, 2024

❌ Gradle check result for 125496b: 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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 5, 2024

❌ Gradle check result for 7ea9533: 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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 5, 2024

❌ Gradle check result for 103f0eb: 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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 5, 2024

✅ Gradle check result for 684cb7b: SUCCESS

@peteralfonsi
Copy link
Copy Markdown
Contributor Author

Previous run flaky tests:
#10006
#13473

@sohami sohami merged commit 5b19454 into opensearch-project:2.x Jun 5, 2024
kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
…g tiered cache with disk cache (opensearch-project#13801)

* [Bugfix] [Tiered Caching] Fixes issues when integrating tiered cache with disk cache (opensearch-project#13784)

---------

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Co-authored-by: Peter Alfonsi <petealft@amazon.com>
(cherry picked from commit e67ced7)
Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* rerun gradle

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

* rerun gradle

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

* rerun gradle

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

* rerun gradle

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

* rerun gradle

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

* rerun dco approval :(

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

* rerun gradle

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

* spotlessApply after merge conflict

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

* rerun gradle

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

* rerun gradle

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>
Signed-off-by: kkewwei <kkewwei@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants