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

Fix recovery path for searchable snapshots #4813

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

andrross
Copy link
Member

Replicas are bootstrapped using the recovery path, as opposed to the restore path used for creating the primary shard. This has been broken in the initial implementation of searchable snapshots. The fix here is to put in the appropriate checks to avoid failing during recovery.

Signed-off-by: Andrew Ross [email protected]

Issues Resolved

#4778

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

Replicas are bootstrapped using the recovery path, as opposed to the
restore path used for creating the primary shard. This has been broken
in the initial implementation of searchable snapshots. The fix here is
to put in the appropriate checks to avoid failing during recovery.

I've also updated the integration test to ensure the recovery path is
always exercised during testing.

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

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross andrross marked this pull request as ready for review October 17, 2022 18:56
@andrross andrross requested review from a team and reta as code owners October 17, 2022 18:56
@codecov-commenter
Copy link

Codecov Report

Merging #4813 (e096c0e) into main (e44158d) will increase coverage by 0.02%.
The diff coverage is 42.85%.

@@             Coverage Diff              @@
##               main    #4813      +/-   ##
============================================
+ Coverage     70.77%   70.80%   +0.02%     
- Complexity    57785    57794       +9     
============================================
  Files          4687     4687              
  Lines        277293   277297       +4     
  Branches      40376    40378       +2     
============================================
+ Hits         196264   196335      +71     
+ Misses        64733    64649      -84     
- Partials      16296    16313      +17     
Impacted Files Coverage Δ
...ch/indices/recovery/PeerRecoveryTargetService.java 52.14% <25.00%> (-0.68%) ⬇️
...rg/opensearch/indices/recovery/RecoveryTarget.java 73.88% <66.66%> (-0.31%) ⬇️
...opensearch/index/mapper/MockFieldFilterPlugin.java 0.00% <0.00%> (-100.00%) ⬇️
.../index/shard/IndexShardNotRecoveringException.java 0.00% <0.00%> (-100.00%) ⬇️
...ava/org/opensearch/action/NoSuchNodeException.java 0.00% <0.00%> (-50.00%) ⬇️
.../opensearch/client/indices/CloseIndexResponse.java 42.50% <0.00%> (-48.75%) ⬇️
...opensearch/persistent/PersistentTasksExecutor.java 22.22% <0.00%> (-40.75%) ⬇️
...r/src/main/java/org/opensearch/http/HttpUtils.java 16.66% <0.00%> (-33.34%) ⬇️
...search/aggregations/pipeline/HoltWintersModel.java 21.47% <0.00%> (-32.22%) ⬇️
...n/java/org/opensearch/test/rest/yaml/Features.java 60.00% <0.00%> (-20.00%) ⬇️
... and 476 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@andrross andrross added the backport 2.x Backport to 2.x branch label Oct 17, 2022
@andrross andrross merged commit 6ac0c7c into opensearch-project:main Oct 17, 2022
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-4813-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6ac0c7cd2054da9a6492c76011d1dcd2e0f518b8
# Push it to GitHub
git push --set-upstream origin backport/backport-4813-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-4813-to-2.x.

@andrross
Copy link
Member Author

@Bukhtawar This change uses the boolean flag introduced in #4318 which complicates the backport to 2.x unless or until that work is backported. Any reason not to do the backporting for the remote translog work now?

andrross added a commit to andrross/OpenSearch that referenced this pull request Oct 24, 2022
Replicas are bootstrapped using the recovery path, as opposed to the
restore path used for creating the primary shard. This has been broken
in the initial implementation of searchable snapshots. The fix here is
to put in the appropriate checks to avoid failing during recovery.

I've also updated the integration test to ensure the recovery path is
always exercised during testing.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 6ac0c7c)
andrross added a commit that referenced this pull request Oct 24, 2022
Replicas are bootstrapped using the recovery path, as opposed to the
restore path used for creating the primary shard. This has been broken
in the initial implementation of searchable snapshots. The fix here is
to put in the appropriate checks to avoid failing during recovery.

I've also updated the integration test to ensure the recovery path is
always exercised during testing.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 6ac0c7c)
ashking94 pushed a commit to ashking94/OpenSearch that referenced this pull request Nov 7, 2022
Replicas are bootstrapped using the recovery path, as opposed to the
restore path used for creating the primary shard. This has been broken
in the initial implementation of searchable snapshots. The fix here is
to put in the appropriate checks to avoid failing during recovery.

I've also updated the integration test to ensure the recovery path is
always exercised during testing.

Signed-off-by: Andrew Ross <[email protected]>

Signed-off-by: Andrew Ross <[email protected]>
@andrross andrross deleted the recovery-updates-2 branch December 16, 2022 18:35
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants