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

Refactor remote store flow to support any path type #12822

Merged
merged 7 commits into from
Mar 26, 2024

Conversation

ashking94
Copy link
Member

@ashking94 ashking94 commented Mar 21, 2024

Description

This PR is a sub task of feature request #12567 and being tracked in meta issue - #12589.

In the prior PR #12607 & #12753, we have introduced remote store path type in the customData field in IndexMetadata and handled association of path types of indexes during snapshot restore. In this PR, we are refactoring existing remote store flows to add support for using any remote store path type with backward compatibility.

In brief, we are doing follow things -

  1. We are replacing all places where we were deriving paths manually (like RemoteSegmentStoreDirectoryFactory.java, RemoteStoreLockManagerFactory.java, TranslogTransferManager & BlobStoreRepository.java - snapshots related) with deriving path using RemoteStorePathType.
  2. We provide implementation for the existing fixed prefix patten, and handle the wiring also.
  3. Write UTs for some new classes.

Related Issues

Resolves #12790

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • [ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • [ ] 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.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Storage:Performance Storage:Resiliency Issues and PRs related to the storage resiliency v2.14.0 labels Mar 21, 2024
Copy link
Contributor

github-actions bot commented Mar 21, 2024

Compatibility status:

Checks if related components are compatible with change d9e12db

Incompatible components

Incompatible components: [https://github.com/opensearch-project/security.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

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

Copy link
Contributor

❕ Gradle check result for 21636af: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.cluster.coordination.AwarenessAttributeDecommissionIT.testConcurrentDecommissionAction

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 70.83%. Comparing base (b15cb0c) to head (d9e12db).
Report is 80 commits behind head on main.

Files Patch % Lines
...h/cluster/metadata/MetadataCreateIndexService.java 83.33% 0 Missing and 1 partial ⚠️
...c/main/java/org/opensearch/index/IndexService.java 0.00% 1 Missing ⚠️
.../main/java/org/opensearch/index/IndexSettings.java 75.00% 0 Missing and 1 partial ⚠️
.../opensearch/index/remote/RemoteStoreDataEnums.java 94.44% 1 Missing ⚠️
...g/opensearch/index/remote/RemoteStorePathType.java 85.71% 1 Missing ⚠️
...arch/index/remote/RemoteStorePathTypeResolver.java 80.00% 1 Missing ⚠️
...in/java/org/opensearch/index/shard/IndexShard.java 80.00% 1 Missing ⚠️
...ndex/store/RemoteSegmentStoreDirectoryFactory.java 87.50% 0 Missing and 1 partial ⚠️
...rg/opensearch/index/translog/RemoteFsTranslog.java 87.50% 0 Missing and 1 partial ⚠️
...dex/translog/transfer/TranslogTransferManager.java 87.50% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12822      +/-   ##
============================================
- Coverage     71.42%   70.83%   -0.59%     
+ Complexity    59978    59735     -243     
============================================
  Files          4985     5012      +27     
  Lines        282275   283714    +1439     
  Branches      40946    41119     +173     
============================================
- Hits         201603   200960     -643     
- Misses        63999    66073    +2074     
- Partials      16673    16681       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ashking94
Copy link
Member Author

ashking94 commented Mar 21, 2024

❕ Gradle check result for 21636af: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.cluster.coordination.AwarenessAttributeDecommissionIT.testConcurrentDecommissionAction

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Flaky test - #12197

Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
…tion

Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
@gbbafna gbbafna changed the title Refactor remote store flow to support any path type with bwc Refactor remote store flow to support any path type Mar 22, 2024
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

❌ Gradle check result for b73200b: 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: Ashish Singh <ssashish@amazon.com>
Copy link
Contributor

❕ Gradle check result for d9e12db: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.classMethod
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=search.aggregation/20_terms/string profiler via global ordinals}
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testRefreshSuccessAfterFailureInFirstAttemptAfterSnapshotAndMetadataUpload

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@ashking94
Copy link
Member Author

❕ Gradle check result for d9e12db: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.classMethod
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=search.aggregation/20_terms/string profiler via global ordinals}
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testRefreshSuccessAfterFailureInFirstAttemptAfterSnapshotAndMetadataUpload

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

flaky tests - #8131 and #9332

@gbbafna gbbafna merged commit 3907ec9 into opensearch-project:main Mar 26, 2024
30 checks passed
ashking94 added a commit to ashking94/OpenSearch that referenced this pull request Apr 23, 2024
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…ct#12822)

Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
@ashking94 ashking94 added the backport 2.x Backport to 2.x branch label Apr 26, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 26, 2024
Signed-off-by: Ashish Singh <ssashish@amazon.com>
(cherry picked from commit 3907ec9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ashking94
Copy link
Member Author

Auto backport failed, raising manual backport.

ashking94 added a commit to ashking94/OpenSearch that referenced this pull request Apr 26, 2024
sachinpkale pushed a commit that referenced this pull request Apr 26, 2024
…2822 #12920  (#13405)

* Refactor remote store flow to support any path type (#12822)

Signed-off-by: Ashish Singh <ssashish@amazon.com>

* Add missed API visibility annotations for public APIs (#12920)

Signed-off-by: Ashish Singh <ssashish@amazon.com>

---------

Signed-off-by: Ashish Singh <ssashish@amazon.com>
harshavamsi pushed a commit to harshavamsi/OpenSearch that referenced this pull request Apr 29, 2024
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 skip-changelog Storage:Performance Storage:Resiliency Issues and PRs related to the storage resiliency v2.14.0
Projects
Status: ✅ Done
Status: Planned work items
Development

Successfully merging this pull request may close these issues.

[Remote Store] Update remote Store flows to support any path type with backward compatibility
3 participants