-
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
Fix snapshotting searchable snapshot indexes #7247
Fix snapshotting searchable snapshot indexes #7247
Conversation
server/src/main/java/org/opensearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
@andrross could you please rebase the branch. |
server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java
Outdated
Show resolved
Hide resolved
04b6e3b
to
cf82891
Compare
Gradle Check (Jenkins) Run Completed with:
|
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com>
cf82891
to
f05e8d2
Compare
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #7247 +/- ##
============================================
- Coverage 71.18% 70.59% -0.59%
+ Complexity 59887 59457 -430
============================================
Files 4859 4859
Lines 285505 285527 +22
Branches 41143 41150 +7
============================================
- Hits 203223 201562 -1661
- Misses 65924 67365 +1441
- Partials 16358 16600 +242
... and 492 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
The backport to
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
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7247-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e1da84d9d2e648066f3948906f935ce06495aac4
# Push it to GitHub
git push --set-upstream origin backport/backport-7247-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
The backport to
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.7 2.7
# Navigate to the new working tree
pushd ../.worktrees/backport-2.7
# Create a new branch
git switch --create backport/backport-7247-to-2.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e1da84d9d2e648066f3948906f935ce06495aac4
# Push it to GitHub
git push --set-upstream origin backport/backport-7247-to-2.7
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.7 Then, create a pull request where the |
@andrross looks like we need manual backport PR's for 2.x and 2.7 |
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit e1da84d)
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit e1da84d)
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit e1da84d)
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit e1da84d)
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves #7204 Signed-off-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit e1da84d)
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves #7204 Signed-off-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit e1da84d)
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com>
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index. Resolves opensearch-project#7204 Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Two changes here: First, when snapshotting a searchable snapshot index (or snapshotting a full cluster that contains searchable snapshot indices) then we will snapshot the index metadata which includes the pointer to the original snapshot, but skip copying the data since it already exists in the source snapshot. Second, when restoring an index from a snapshot that is itself a searchable snapshot index, then it must be handled as such and restored as a searchable snapshot index.
Resolves #7204
Check List
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.