Implement hidden aliases#52547
Merged
AthenaEryma merged 21 commits intoelastic:masterfrom Mar 3, 2020
Merged
Conversation
This commit introduces hidden aliases. These are similar to hidden indices, in that they are not visible by default, unless explicitly specified by name or by indicating that hidden indices/aliases are desired. The new alias property, `is_hidden` is implemented similarly to `is_write_index`, except that it must be consistent across all indices with a given alias - that is, all indices with a given alias must specify the alias as either hidden, or all specify it as non-hidden, either explicitly or by omitting the `is_hidden` property.
Collaborator
|
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
jaymode
reviewed
Feb 20, 2020
Member
jaymode
left a comment
There was a problem hiding this comment.
Looking good so far. I left a question just to make sure I am understanding properly.
server/src/main/java/org/elasticsearch/cluster/metadata/AliasOrIndex.java
Show resolved
Hide resolved
jaymode
approved these changes
Mar 2, 2020
Member
jaymode
left a comment
There was a problem hiding this comment.
I left some suggestions about being consistent with @Nullable for isHidden even when we aren't completely consistent with other items. LGTM.
| public Add(String index, String alias, @Nullable String filter, @Nullable String indexRouting, | ||
| @Nullable String searchRouting, @Nullable Boolean writeIndex) { | ||
| public Add(String index, String alias, @Nullable String filter, @Nullable String indexRouting, @Nullable String searchRouting, | ||
| @Nullable Boolean writeIndex, Boolean isHidden) { |
Member
There was a problem hiding this comment.
Suggested change
| @Nullable Boolean writeIndex, Boolean isHidden) { | |
| @Nullable Boolean writeIndex, @Nullable Boolean isHidden) { |
| return writeIndex; | ||
| } | ||
|
|
||
| public Boolean isHidden() { |
Member
There was a problem hiding this comment.
Suggested change
| public Boolean isHidden() { | |
| @Nullable | |
| public Boolean isHidden() { |
| private final Boolean isHidden; | ||
|
|
||
| private AliasMetaData(String alias, CompressedXContent filter, String indexRouting, String searchRouting, Boolean writeIndex, | ||
| Boolean isHidden) { |
Member
There was a problem hiding this comment.
Suggested change
| Boolean isHidden) { | |
| @Nullable Boolean isHidden) { |
| return writeIndex; | ||
| } | ||
|
|
||
| public Boolean isHidden() { |
Member
There was a problem hiding this comment.
Suggested change
| public Boolean isHidden() { | |
| @Nullable | |
| public Boolean isHidden() { |
Contributor
Author
|
Thanks for the review @jaymode, nice catches. |
AthenaEryma
added a commit
to AthenaEryma/elasticsearch
that referenced
this pull request
Mar 4, 2020
This commit introduces hidden aliases. These are similar to hidden indices, in that they are not visible by default, unless explicitly specified by name or by indicating that hidden indices/aliases are desired. The new alias property, `is_hidden` is implemented similarly to `is_write_index`, except that it must be consistent across all indices with a given alias - that is, all indices with a given alias must specify the alias as either hidden, or all specify it as non-hidden, either explicitly or by omitting the `is_hidden` property.
AthenaEryma
added a commit
that referenced
this pull request
Mar 6, 2020
This commit introduces hidden aliases. These are similar to hidden indices, in that they are not visible by default, unless explicitly specified by name or by indicating that hidden indices/aliases are desired. The new alias property, `is_hidden` is implemented similarly to `is_write_index`, except that it must be consistent across all indices with a given alias - that is, all indices with a given alias must specify the alias as either hidden, or all specify it as non-hidden, either explicitly or by omitting the `is_hidden` property.
AthenaEryma
added a commit
to AthenaEryma/elasticsearch
that referenced
this pull request
Mar 6, 2020
This commit corrects the serialization versions for hidden alias data following the backport of elastic#52547.
AthenaEryma
added a commit
that referenced
this pull request
Mar 7, 2020
This commit corrects the serialization versions for hidden alias data following the backport of #52547.
38 tasks
russcam
added a commit
to elastic/elasticsearch-net
that referenced
this pull request
Apr 16, 2020
Relates: elastic/elasticsearch#52547 Relates: elastic/elasticsearch#53248 This commit adds the ability to mark indices and aliases as hidden.
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.
This commit introduces hidden aliases. These are similar to hidden
indices, in that they are not visible by default, unless explicitly
specified by name or by indicating that hidden indices/aliases are
desired.
The new alias property,
is_hiddenis implemented similarly tois_write_index, except that it must be consistent across all indiceswith a given alias - that is, all indices with a given alias must
specify the alias as either hidden, or all specify it as non-hidden,
either explicitly or by omitting the
is_hiddenproperty.This just implements hidden indices and makes a few tweaks to alias resolution to compensate - there's still a few problems that need to be addressed with visible aliases on hidden indices such as elastic/kibana#58722 (comment) and #52304.