-
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
Abstract AsyncShardFetch cache to allow restructuring for other caching strategies #12441
Conversation
Signed-off-by: Aman Khare <[email protected]>
❌ Gradle check result for c26c6c1: 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? |
Compatibility status:Checks if related components are compatible with change d7903f7 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git] |
Signed-off-by: Aman Khare <[email protected]>
❌ Gradle check result for 608c8ae: 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: Aman Khare <[email protected]>
❌ Gradle check result for a6921f0: 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? |
server/src/main/java/org/opensearch/gateway/BaseShardCache.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Aman Khare <[email protected]>
❌ Gradle check result for 0daa63e: 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: Aman Khare <[email protected]>
❕ Gradle check result for 8383c63: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12441 +/- ##
============================================
- Coverage 71.43% 71.35% -0.08%
- Complexity 59960 59982 +22
============================================
Files 4984 4985 +1
Lines 282247 282275 +28
Branches 40952 40946 -6
============================================
- Hits 201617 201415 -202
- Misses 63954 64198 +244
+ Partials 16676 16662 -14 ☔ View full report in Codecov by Sentry. |
Flaky test link : #10152 |
… child class Signed-off-by: Aman Khare <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
❕ Gradle check result for 91e094a: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
server/src/main/java/org/opensearch/gateway/BaseShardCache.java
Outdated
Show resolved
Hide resolved
Changes LGTM but there are no tests added for changes in this PR. Are they already covered? |
server/src/main/java/org/opensearch/gateway/BaseShardCache.java
Outdated
Show resolved
Hide resolved
Thanks @sachinpkale ! This PR is just for abstracting out the code from 1 single file to 3 different files for better extensibility. |
…se class to make it specific Signed-off-by: Aman Khare <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
❌ Gradle check result for 9fe6a07: 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: Aman Khare <[email protected]>
❌ Gradle check result for ad0026a: 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? |
Please fix the build. |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-12441-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b15cb0c52be59ceaad16f2f47b3af3018a563211
# Push it to GitHub
git push --set-upstream origin backport/backport-12441-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
…ng strategies (opensearch-project#12441) * Abstract AsyncShardFetch cache to allow restructuring for batch mode Signed-off-by: Aman Khare <[email protected]>
…ng strategies (opensearch-project#12441) * Abstract AsyncShardFetch cache to allow restructuring for batch mode Signed-off-by: Aman Khare <[email protected]>
…ng strategies (opensearch-project#12441) * Abstract AsyncShardFetch cache to allow restructuring for batch mode Signed-off-by: Aman Khare <[email protected]>
…ng strategies (opensearch-project#12441) * Abstract AsyncShardFetch cache to allow restructuring for batch mode Signed-off-by: Aman Khare <[email protected]> (cherry picked from commit b15cb0c)
…ng strategies (#12441) (#12761) * Abstract AsyncShardFetch cache to allow restructuring for batch mode Signed-off-by: Aman Khare <[email protected]> (cherry picked from commit b15cb0c)
…ng strategies (opensearch-project#12441) * Abstract AsyncShardFetch cache to allow restructuring for batch mode Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Abstract AsyncShardFetch cache to allow restructuring for other caching strategies.
Currently cache is like
private final Map<String, NodeEntry<T>> cache = new HashMap<>();
This is can not support other strategies. So abstracting out this implementation in a separate class will help other caching strategies to be implemented easily.
Related Issues
Resolves ##12440
Check List
- [ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)- [ ] Public documentation issue/PR createdBy 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.