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

Restore ClusterState version during remote state restore #10853

Conversation

linuxpi
Copy link
Collaborator

@linuxpi linuxpi commented Oct 23, 2023

Description

  • During QL remote state restore we do not restore previous cluster state version
  • With this change, we intent to restore the cluster state version back.

Related Issues

Resolves #10692

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 Cluster Manager enhancement Enhancement or improvement to existing feature or request Search:Remote Search Storage Issues and PRs relating to data and metadata storage v2.12.0 Issues and PRs related to version 2.12.0 labels Oct 23, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2023

Compatibility status:

Checks if related components are compatible with change b39b696

Incompatible components

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

Skipped components

Compatible components

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

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #10853 (b39b696) into main (0c9fc21) will decrease coverage by 0.08%.
Report is 1 commits behind head on main.
The diff coverage is 30.76%.

@@             Coverage Diff              @@
##               main   #10853      +/-   ##
============================================
- Coverage     71.23%   71.16%   -0.08%     
+ Complexity    58730    58695      -35     
============================================
  Files          4872     4872              
  Lines        276707   276712       +5     
  Branches      40222    40222              
============================================
- Hits         197124   196923     -201     
- Misses        63115    63377     +262     
+ Partials      16468    16412      -56     
Files Coverage Δ
...arch/gateway/remote/RemoteClusterStateService.java 72.70% <80.00%> (+0.55%) ⬆️
...arch/index/recovery/RemoteStoreRestoreService.java 12.59% <0.00%> (-0.21%) ⬇️

... and 501 files with indirect coverage changes

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.client.PitIT.testDeleteAllAndListAllPits

@linuxpi linuxpi force-pushed the auto-restore-cluster-state-version-remote-state branch from 1730b9d to 978a073 Compare October 25, 2023 04:11
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: bansvaru <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: bansvaru <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Contributor

@BhumikaSaini-Amazon BhumikaSaini-Amazon left a comment

Choose a reason for hiding this comment

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

Do we need to add assertions to the existing tests to validate that the ClusterState version is indeed restored?

@linuxpi
Copy link
Collaborator Author

linuxpi commented Oct 27, 2023

Do we need to add assertions to the existing tests to validate that the ClusterState version is indeed restored?

We have added assertions to validate new cluster state version would always be greater than previous version

@linuxpi linuxpi self-assigned this Oct 27, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testDownloadStatsCorrectnessSinglePrimarySingleReplica

Copy link
Contributor

@BhumikaSaini-Amazon BhumikaSaini-Amazon left a comment

Choose a reason for hiding this comment

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

Thanks @linuxpi!

@shwetathareja shwetathareja merged commit 73bbeb5 into opensearch-project:main Oct 29, 2023
23 of 26 checks passed
@shwetathareja shwetathareja added the backport 2.x Backport to 2.x branch label Oct 29, 2023
@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-10853-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 73bbeb57a8a56de0d1f9cf69e711a8a0ff26afe5
# Push it to GitHub
git push --set-upstream origin backport/backport-10853-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-10853-to-2.x.

@linuxpi
Copy link
Collaborator Author

linuxpi commented Oct 29, 2023

will raise the backport pr manually

linuxpi added a commit to linuxpi/OpenSearch that referenced this pull request Oct 30, 2023
…project#10853)

* Restore ClusterState version during remote state restore

Signed-off-by: bansvaru <[email protected]>
(cherry picked from commit 73bbeb5)
@linuxpi linuxpi deleted the auto-restore-cluster-state-version-remote-state branch October 30, 2023 02:41
shwetathareja pushed a commit that referenced this pull request Oct 30, 2023
…0981)

* Restore ClusterState version during remote state restore

Signed-off-by: bansvaru <[email protected]>
(cherry picked from commit 73bbeb5)
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…project#10853)

* Restore ClusterState version during remote state restore

Signed-off-by: bansvaru <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
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 backport-failed Cluster Manager enhancement Enhancement or improvement to existing feature or request Search:Remote Search Storage Issues and PRs relating to data and metadata storage v2.12.0 Issues and PRs related to version 2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Remote State] Restore cluster state version during remote state auto restore.
3 participants