fix: Gate internal ignore settings on remote data attributes in restore - #22570
Open
piyushk6130 wants to merge 1 commit into
Open
fix: Gate internal ignore settings on remote data attributes in restore#22570piyushk6130 wants to merge 1 commit into
piyushk6130 wants to merge 1 commit into
Conversation
The internal ignore settings (index.remote_store.*) are only applied during snapshot restore when the cluster is considered non-remote-store. This check used isRemoteStoreAttributePresent(), which also matches remote_publication.* node attributes. Clusters with only remote cluster state / routing table publication enabled do not store index data remotely, but were wrongly treated as remote store clusters, so stale remote store index settings from the snapshot were never stripped. Such stale settings later fail shard recovery with RepositoryMissingException when the referenced repositories do not exist on the cluster. Gate the internal ignore settings on isRemoteDataAttributePresent() (segment/translog repository attributes) instead, and extract the logic into a static method for testability. Signed-off-by: Piyush Kumar <piykumab@amazon.com>
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22570 +/- ##
============================================
- Coverage 71.45% 71.35% -0.10%
+ Complexity 76760 76703 -57
============================================
Files 6136 6142 +6
Lines 357635 357762 +127
Branches 52128 52148 +20
============================================
- Hits 255532 255296 -236
- Misses 81755 82095 +340
- Partials 20348 20371 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The internal ignore settings (index.remote_store.) are only applied during snapshot restore when the cluster is considered non-remote-store. This check used isRemoteStoreAttributePresent(), which also matches remote_publication. node attributes. Clusters with only remote cluster state / routing table publication enabled do not store index data remotely, but were wrongly treated as remote store clusters, so stale remote store index settings from the snapshot were never stripped.
Such stale settings later fail shard recovery with RepositoryMissingException when the referenced repositories do not exist on the cluster.
Gate the internal ignore settings on isRemoteDataAttributePresent() (segment/translog repository attributes) instead, and extract the logic into a static method for testability.
Description
[Describe what this change achieves]
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
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.