Skip to content

Comments

Cleanup of IndexSettingProvider#135251

Merged
felixbarny merged 11 commits intoelastic:mainfrom
felixbarny:index-settings-provider-index-version
Sep 24, 2025
Merged

Cleanup of IndexSettingProvider#135251
felixbarny merged 11 commits intoelastic:mainfrom
felixbarny:index-settings-provider-index-version

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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >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 (obsolete) DO NOT USE. This team no longer exists. 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
breskeby pushed a commit to breskeby/elasticsearch that referenced this pull request Feb 11, 2026
breskeby pushed a commit to breskeby/elasticsearch that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. 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 (obsolete) DO NOT USE. This team no longer exists. v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants