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

[Remote Store] Add RemoteStoreSettings class to handle remote store related settings #12838

Merged

Conversation

sachinpkale
Copy link
Member

@sachinpkale sachinpkale commented Mar 21, 2024

Description

  • Currently, remote store related settings are scattered across various classes and adding a new setting requires defining the setting in IndicesService and pass the supplier to downstream classes.
  • But with one new setting, it gets difficult to pass one more parameter to the constructor of IndexService, IndexShard etc.
  • In this PR, we have abstracted out remote store related settings to a new settings class: RemoteStoreSettings

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.

Copy link
Contributor

❌ Gradle check result for 7dc7de5: 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 14c7a36: 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

github-actions bot commented Mar 21, 2024

Compatibility status:

Checks if related components are compatible with change f5cfd1c

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/anomaly-detection.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/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/sql.git]

Copy link
Contributor

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

Sachin Kale added 2 commits March 22, 2024 09:29
Signed-off-by: Sachin Kale <[email protected]>
Signed-off-by: Sachin Kale <[email protected]>
Copy link
Contributor

❕ Gradle check result for aba2c38: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testDownloadStatsCorrectnessSinglePrimaryMultipleReplicaShards

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 22, 2024

Codecov Report

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

Project coverage is 71.45%. Comparing base (b15cb0c) to head (f5cfd1c).
Report is 75 commits behind head on main.

Files Patch % Lines
...va/org/opensearch/indices/RemoteStoreSettings.java 88.23% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12838      +/-   ##
============================================
+ Coverage     71.42%   71.45%   +0.03%     
- Complexity    59978    60296     +318     
============================================
  Files          4985     5013      +28     
  Lines        282275   283672    +1397     
  Branches      40946    41117     +171     
============================================
+ Hits         201603   202708    +1105     
- Misses        63999    64112     +113     
- Partials      16673    16852     +179     

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

@ashking94
Copy link
Member

testDownloadStatsCorrectnessSinglePrimaryMultipleReplicaShards

Flaky test - #10152

Copy link
Contributor

✅ Gradle check result for f5cfd1c: SUCCESS

Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm overall, have left some minor comments.

Copy link
Collaborator

@Bukhtawar Bukhtawar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor

@sachinpkale sachinpkale merged commit 8ad0dc0 into opensearch-project:main Mar 28, 2024
33 of 36 checks passed
@sachinpkale sachinpkale added the backport 2.x Backport to 2.x branch label Mar 28, 2024
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

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-12838-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8ad0dc09d3e852d74cd7eac65882ea7674a282d9
# Push it to GitHub
git push --set-upstream origin backport/backport-12838-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 base branch is 2.x and the compare/head branch is backport/backport-12838-to-2.x.

sachinpkale added a commit to sachinpkale/OpenSearch that referenced this pull request Mar 28, 2024
…elated settings (opensearch-project#12838)

* Add RemoteStoreSettings class to handle remote store related settings
---------
Signed-off-by: Sachin Kale <[email protected]>
Co-authored-by: Sachin Kale <[email protected]>
@gbbafna
Copy link
Collaborator

gbbafna commented Apr 4, 2024

@sachinpkale : can you please manually backport this ?

shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…elated settings (opensearch-project#12838)

* Add RemoteStoreSettings class to handle remote store related settings
---------
Signed-off-by: Sachin Kale <[email protected]>
Co-authored-by: Sachin Kale <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
harshavamsi pushed a commit to harshavamsi/OpenSearch that referenced this pull request Apr 29, 2024
…elated settings (opensearch-project#12838)

* Add RemoteStoreSettings class to handle remote store related settings
---------
Signed-off-by: Sachin Kale <[email protected]>
Co-authored-by: Sachin Kale <[email protected]>
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.

5 participants