Handle snapshot restore in file settings#89321
Merged
grcevski merged 11 commits intoelastic:mainfrom Aug 16, 2022
Merged
Conversation
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
grcevski
commented
Aug 12, 2022
| * </p> | ||
| */ | ||
| public interface ReservedClusterStateHandler<T> { | ||
| String CONTENT = "content"; |
Contributor
Author
There was a problem hiding this comment.
This was just some dead code, left from earlier refactoring.
Collaborator
|
Hi @grcevski, I've created a changelog YAML for you. |
Contributor
Author
|
@elasticsearchmachine test this please |
ChrisHegarty
approved these changes
Aug 15, 2022
| */ | ||
| public Builder(ReservedStateMetadata metadata) { | ||
| this(metadata.namespace); | ||
| if (metadata != null) { |
Contributor
There was a problem hiding this comment.
Is this null check redundant? On the previous line, metadata.namespace will throw a NPE if metadata is null
Collaborator
💚 Backport successful
|
grcevski
added a commit
to grcevski/elasticsearch
that referenced
this pull request
Aug 16, 2022
10 tasks
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 16, 2022
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.
Background information
File based settings create a reserved cluster state, preventing REST mutation of any settings/entities created in this mode. The only way these settings can be modified is through a change in the operator/settings.json file inside our config directory.
When we do snapshot restore we can also bring back the global cluster state, effectively rewriting the cluster state and with it any reserved state. This introduces few issues related to file based settings:
Adding support for snapshots in file based settings
To support snapshots in file based settings we take the following approach:
Relates to #89183