Skip to content

Conversation

@kkrik-es
Copy link
Contributor

Related to #119993

@kkrik-es kkrik-es added >non-issue auto-backport Automatically create backport pull requests when merged Team:StorageEngine :StorageEngine/Logs You know, for Logs v8.18.0 labels Jan 17, 2025
@kkrik-es kkrik-es self-assigned this Jan 17, 2025
@kkrik-es kkrik-es requested a review from martijnvg January 20, 2025 13:52
@kkrik-es kkrik-es marked this pull request as ready for review January 20, 2025 13:52
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Looks good! I don't think we need to do a deprecation for _source.mode for indices.

List<String> indexes = new ArrayList<>();
for (String indexName : clusterState.metadata().getIndices().keySet()) {
IndexMetadata indexMetadata = clusterState.metadata().getIndices().get(indexName);
if (SourceFieldMapper.onOrAfterDeprecateModeVersion(indexMetadata.getCreationVersion())) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to emit warnings for _source.mode mapping attribute usage in indices, because these are not actionable. The source mode can't be changed after the index has been created. This is different for templates.

Copy link
Member

Choose a reason for hiding this comment

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

Note that create index api will return emit a deprecation warning if _source.mode mapping attribute is used. This is visible as response header and in the deprecation log file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, ptal.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

@kkrik-es kkrik-es merged commit 110b206 into elastic:main Jan 21, 2025
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 120387

@kkrik-es
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

kkrik-es added a commit to kkrik-es/elasticsearch that referenced this pull request Jan 21, 2025
elastic#120387)

* Node deprecation warning for indexes and component templates with source mode in mapping

* remove index warnings

* restrict to component templates

* refine

(cherry picked from commit 110b206)

# Conflicts:
#	x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java
elasticsearchmachine pushed a commit that referenced this pull request Jan 21, 2025
…th sou… (#120387) (#120493)

* Node deprecation warning for indexes and component templates with sou… (#120387)

* Node deprecation warning for indexes and component templates with source mode in mapping

* remove index warnings

* restrict to component templates

* refine

(cherry picked from commit 110b206)

# Conflicts:
#	x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java

* [CI] Auto commit changes from spotless

* fix compilation error

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
@kkrik-es kkrik-es deleted the fix/119993 branch January 29, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending >non-issue :StorageEngine/Logs You know, for Logs Team:StorageEngine v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants