-
Notifications
You must be signed in to change notification settings - Fork 4.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 alias and template setup order #12149
Conversation
There is the chance an index is not correctly managed by ILM, due to setup order. This changes fixes the order.
Update mockClientHandler to implement the complete interface and record the order of 'create/load' operations. This is used to validate the index management unit tests for always checking the correct order of index management operations in the index manager.
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.
So just to see if I get this wright. The problem is that a beat might already write to an alias, although the template hasn't been created yet, leading to the template not being applied to the index afterwards? Especially when users do not run dedicated setup
cmd but setup is done during startup?
@urso You mention there is a chance that it is not correctly managed. But based on the code it seems that was always the case as the alias / index was always created before the template when a Beat was directly started? I remember we had the same bug in the initial code of ILM but it got fixed before it was shipped in 6.x. So my assumption is the above affects all 7.x releases? I added a needs_backport label. @simitt That is also my understanding. |
@ruflin it looks I introduced this bug just recently https://github.com/elastic/beats/pull/11777/files#diff-a7b20900159263d87105489854d4d628R216, and I think this is only in master so far. |
@ruflin could you by any chance point to that fix? I'd like to follow along with those changes. |
Code in 7.0 handles this correctly. This PR fixes a code regression and adds improves checks. Unfortunately python tests fail now, as index is setup correctly. Need to do some more investigation in 7.0. |
jenkins, test this |
There are a many changes in how we do setup and test in flight the recent days. |
There is the chance an index is not correctly managed by ILM, due to
setup order. This changes fixes the order.