-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Improve data stream rollover and simplify cluster metadata validation for data streams #70934
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
Improve data stream rollover and simplify cluster metadata validation for data streams #70934
Conversation
…etadata no longer attempts to ensure that indices or aliases cannot conflict with future backing index names for data streams
|
Pinging @elastic/es-core-features (Team:Core/Features) |
|
@martijnvg, the main part of this change is in the first commit. The second commit moves |
martijnvg
left a comment
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.
👍 LGTM
| long currentTimeMillis = timeProvider.getAsLong(); | ||
| do { | ||
| newWriteIndexName = DataStream.getDefaultBackingIndexName(getName(), ++generation, currentTimeMillis); | ||
| } while (clusterMetadata.getIndicesLookup().containsKey(newWriteIndexName)); |
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.
👍 simple and nicely encapsulated in this method
|
Thanks, @martijnvg! |
… for data streams (elastic#70934)
If a naming conflict for a new write index is detected when a data stream rolls over, it will now increment its own generation until the new write index's name does not conflict with any other indices, aliases, or data streams. This allows us to remove the trappy validation around name conflicts for the backing indices of data streams.
Fixes #70905.