-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Correcting the index version filter in migration reindex logic #118487
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
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
* The version before which we do not support writes in the _next_ major version of Elasticsearch. For example, Elasticsearch 10.x will | ||
* not support writing to indices created before version 9.0.0. | ||
*/ | ||
private static final IndexVersion MINIMUM_WRITEABLE_VERSION_AFTER_UPGRADE = IndexVersions.UPGRADE_TO_LUCENE_10_0_0; |
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.
Good explanation and naming 👍
* This predicate allows through only indices that were created with a previous lucene version, meaning that they need to be reindexed | ||
* in order to be writable in the _next_ lucene version. | ||
*/ | ||
public static Predicate<Index> getOldIndexVersionPredicate(Metadata metadata) { |
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.
nit: maybe change predicate name to hasOldIndexVersion
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.
Err maybe not. I see that the current naming is meant to explain that you are making a predicate from the metadata
…ic#118487) (elastic#118503) * Correcting the index version filter in migration reindex logic (elastic#118487) * fixing the version for 8.x
…ic#118487) (elastic#118503) * Correcting the index version filter in migration reindex logic (elastic#118487) * fixing the version for 8.x
This corrects the index version filter in the migration reindex logic. We want to require reindexing of indices if they were created before the current version, because those indices will not be writable in the next version. So for Elasticsearch 9, we want to return any indices created before Elasticsearch 9 because those will not be writable in Elasticsearch 10. When this is backported to 8.18 we will want to change this version to Elasticsearch 8.0.0 because Elasticsearch 9 will not support writing to any indices created before 8.0.0.