-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Check diffMappings after WAIT_FOR_YELLOW_SOURCE #148980
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
Merged
gsoldevila
merged 3 commits into
elastic:main
from
gsoldevila:kbn-147371-wait-for-yellow-before-diff-mappings
Jan 17, 2023
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to get your thoughts:
By passing
aliaseshere it seems more likely that this object could be stale if other Kibana's see yellow source before us. We would reach thePREPARE_COMPATIBLE_MIGRATIONstep, get analias_not_foundexception and still go toOUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. So all good?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point!
The only way I see to get fresher aliases information would be to perform a
GET .kibanaagain (like theINITstep does), and even in that case, there's no way to guarantee that another instance will not delete the aliases before us, so I'm not sure it is worth it.If the other instance is the same version, and it performs the same cleanup of aliases before us, it's alright to proceed to
OUTDATED_DOCUMENTS_SEARCH_OPEN_PITonalias_not_found. As you said, odds of this happening are increasing with this fix, but the behavior / handling is still correct IMHO.If the other instance is a more recent version, it will obtain the aliases in the INIT step:
.kibanaalias and make it point to the newly created index. In this case we'd have some garbage version aliases pointing to an older index version, but that's already the case without this fix.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ there's always a potential race condition between the time we get the fetchAliases respose and performing the
preTransformDocsActions. Before it was probably in the order of < 100ms and now it could potentially be many minutes. So this makes any potential race conditions more likely to occur but doesn't introduce anything new.Like you both said, any race conditions should be handled in
PREPARE_COMPATIBLE_MIGRATIONalready.