Skip to content

Conversation

felixbarny
Copy link
Member

In #133232, we've added the ability to provide index metadata with an IndexSettingProvider. It turned out that we don't need that functionality as we ended up using a private index setting in #132566.

This also adds the IndexVersion as another parameter. This is in preparation for this suggestion to conditionally set one or another setting, depending on the index version.

In elastic#133232, we've added the ability to provide index metadata with an IndexSettingProvider.
It turned out that we don't need that functionality as we ended up using a private index setting in elastic#132566.

This also adds the `IndexVersion` as another parameter. This is in preparation for [this](elastic#132566 (comment)) suggestion to conditionally set one or another setting, depending on the index version.
@felixbarny felixbarny added :Data Management/Indices APIs APIs to create and manage indices and templates >non-issue labels Sep 23, 2025
@elasticsearchmachine elasticsearchmachine added v9.2.0 external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Data Management Meta label for data/management team labels Sep 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Sep 23, 2025
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I left one comment

@felixbarny
Copy link
Member Author

Pointing out a change for how the IndexVersion is resolved:

The final index version is now determined before calling any IndexSettingProvider and trying to set index.version.created in a provider leads to an exception during validation. This is so that the providers can rely on the version to be the one that's actually used for the created index and that the version can't be changed by a provider that runs after them.

To resolve the index version, I'm now considering both the request settings and the template settings and I'm filtering out user-provided settings for failure indices (such as the index version) as it's done later in MetadataCreateIndexService#aggregateIndexSettings.

@felixbarny felixbarny merged commit bce397f into elastic:main Sep 24, 2025
34 checks passed
@felixbarny felixbarny deleted the index-settings-provider-index-version branch September 24, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates external-contributor Pull request authored by a developer outside the Elasticsearch team >non-issue serverless-linked Added by automation, don't add manually Team:Data Management Meta label for data/management team v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants