-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Introduce IndexSettingDeprecatedInV8AndRemovedInV9 Setting property #120334
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
Introduce IndexSettingDeprecatedInV8AndRemovedInV9 Setting property #120334
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Hi @alexey-ivanov-es, I've created a changelog YAML for you. |
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.
Does IndexSettingDeprecatedInV8AndRemovedInV9
also need to be added to the following?:
public boolean isDeprecatedAndRemoved()
org.elasticsearch.xpack.migrate.action.CreateIndexFromSourceTransportAction#filterSettings
@JVerwolf
Before we have IndexVersion for V9 release these settings should continue to work as deprecated, so we shouldn't throw exception if they are used and we shouldn't filter out them during reindexing |
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
Quick question after reading this:
Does "remove" here mean using the setting in 9 will throw an error, but the settings constant remains for backwards compatibility with indices created in 7 or 8? I assume so but "removal" somehow sounds like removal of the settings themselves from the codebase. We cannot really do that now for settings that might still be used in version 7 indices. |
Yes, that's correct - users won't be able to use the setting anymore, but it will remain in the codebase. As you rightly said, it's still needed for backward compatibility and this is exactly why we need |
Index-scope settings deprecated in one major version cannot be removed in the next major version after the deprecation because they might still be used in indices created by the previous version. These settings should remain in the code but be prohibited when new indices are created.
To achieve this, such settings should be marked as
IndexSettingDeprecatedInVXAndRemovedInVY
and there is a special check to prohibit their usage in newer indices. In V9 Elasticsearch Elasticsearch will still support reading indices created by V7, soIndexSettingDeprecatedInV7AndRemovedInV8
will remain in the code.Currently, there are plans to deprecate index-scope settings in 8.18 and remove them in 9.0. This change introduces the
IndexSettingDeprecatedInV8AndRemovedInV9
constant to mark these settings.The check to enforce the prohibition of settings removed in V9 will be introduced separately once we have
IndexVersion
after marking all relevant settings as removed.