Skip to content

Avoid serializing empty _source fields in mappings. #122606

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

Merged
merged 10 commits into from
Mar 6, 2025

Conversation

martijnvg
Copy link
Member

No description provided.

@martijnvg martijnvg added :StorageEngine/Mapping The storage related side of mappings >bug labels Feb 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @martijnvg, I've created a changelog YAML for you.

@martijnvg martijnvg added v9.0.0 v8.18.1 v9.0.1 auto-backport Automatically create backport pull requests when merged and removed v9.0.0 labels Mar 3, 2025
@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Mar 3, 2025
(b, n, v) -> b.field(n, v.toString().toLowerCase(Locale.ROOT)),
v -> v.toString().toLowerCase(Locale.ROOT)
).setMergeValidator((previous, current, conflicts) -> (previous == current) || current != Mode.STORED)
this.mode = new Parameter<>("mode", true, () -> null, (n, c, o) -> Mode.valueOf(o.toString().toUpperCase(Locale.ROOT)), m -> {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the actual fix. The initializer set the mode only based on whether enabled parameter was specified and didn't check the serializeMode field.

@martijnvg martijnvg marked this pull request as ready for review March 3, 2025 15:17
@elasticsearchmachine
Copy link
Collaborator

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

.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.FAILURE_STORE_ENABLED);

if (oldVersion.before(Version.fromString("9.1.0"))) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I plan to backport this all the way to 8.18 branch, which means when back ported this version will be updated. And I think after 8.19 has been removed this can be removed from main.

@martijnvg martijnvg merged commit ea8283e into elastic:main Mar 6, 2025
18 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

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

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

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 6, 2025
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 6, 2025
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 6, 2025
martijnvg added a commit that referenced this pull request Mar 7, 2025
elasticsearchmachine pushed a commit that referenced this pull request Mar 7, 2025
* [8.x] Avoid serializing empty _source fields in mappings.

Backporting #122606 to 8.x branch.

* Fix initialize builder for merging

* iter
martijnvg added a commit that referenced this pull request Mar 8, 2025
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Mar 11, 2025
costin pushed a commit to costin/elasticsearch that referenced this pull request Mar 15, 2025
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 18, 2025
Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from cluster setup. Given that elastic#122606 is now backported to the 8.18 branch.
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 18, 2025
Update `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from cluster setup. Given that elastic#122606 is now backported to the 8.18 branch.
martijnvg added a commit that referenced this pull request Mar 19, 2025
…5074)

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that #122606 is now backported to the 8.18 branch.
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 19, 2025
Backporting elastic#125074 to 9.0 branch.

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that elastic#122606 is now backported to the 8.18 branch.
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 19, 2025
Backporting elastic#125074 to 8.x branch.

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that elastic#122606 is now backported to the 8.18 branch.
elasticsearchmachine pushed a commit that referenced this pull request Mar 19, 2025
…. i (#125220)

Backporting #125074 to 9.0 branch.

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that #122606 is now backported to the 8.18 branch.
elasticsearchmachine pushed a commit that referenced this pull request Mar 19, 2025
#125221)

Backporting #125074 to 8.x branch.

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that #122606 is now backported to the 8.18 branch.
smalyshev pushed a commit to smalyshev/elasticsearch that referenced this pull request Mar 21, 2025
…stic#125074)

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that elastic#122606 is now backported to the 8.18 branch.
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
…stic#125074)

Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that elastic#122606 is now backported to the 8.18 branch.
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 >bug serverless-linked Added by automation, don't add manually :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.18.1 v8.19.0 v9.0.1 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants