Skip to content

Fixed an edge case that forced some text fields to be stored in ignored source#139415

Merged
Kubik42 merged 3 commits intoelastic:mainfrom
Kubik42:text-fields-store-serialization-fix
Dec 15, 2025
Merged

Fixed an edge case that forced some text fields to be stored in ignored source#139415
Kubik42 merged 3 commits intoelastic:mainfrom
Kubik42:text-fields-store-serialization-fix

Conversation

@Kubik42
Copy link
Copy Markdown
Contributor

@Kubik42 Kubik42 commented Dec 12, 2025

In #138796 we discovered a bug where due to this check, some text fields were being stored in ignored source. This was unintended.

Unfortunately, while 9.3 is not yet released, the bug is already in serverless. This PR aims to address that.

First, we're going to keep store new default as it makes fixing this bug easier. And second, we're going to apply an upper and lower index version check to still read ignored source in block loaders for indices created between when the bug was introduced and now.

@Kubik42 Kubik42 added >bug test-full-bwc Trigger full BWC version matrix tests Team:StorageEngine :StorageEngine/Mapping The storage related side of mappings labels Dec 12, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@Kubik42 Kubik42 force-pushed the text-fields-store-serialization-fix branch 3 times, most recently from 9f502c0 to 6a7e0ff Compare December 12, 2025 19:39
@Kubik42 Kubik42 force-pushed the text-fields-store-serialization-fix branch from 3827583 to 078f36b Compare December 14, 2025 19:40
@Kubik42 Kubik42 marked this pull request as ready for review December 14, 2025 20:56
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@Kubik42 Kubik42 force-pushed the text-fields-store-serialization-fix branch from cbcdb9c to f5de8e0 Compare December 14, 2025 21:22
@Kubik42 Kubik42 removed the test-full-bwc Trigger full BWC version matrix tests label Dec 14, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@Kubik42 Kubik42 force-pushed the text-fields-store-serialization-fix branch from 1a047e1 to cc13ebe Compare December 14, 2025 22:24

public void testStoreParameterDefaultsToFalseWithLatestIndexVersionWhenSyntheticSourceIsEnabled() throws IOException {
var indexSettings = getIndexSettingsBuilder().put(IndexSettings.INDEX_MAPPER_SOURCE_MODE_SETTING.getKey(), "synthetic").build();
public void testStoring() throws IOException {
Copy link
Copy Markdown
Contributor Author

@Kubik42 Kubik42 Dec 14, 2025

Choose a reason for hiding this comment

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

It looks like as though I changed a lot of the tests, but in reality the changes boil down to adding a few extra checks into the existing tests and renaming some things. These checks are:

  • verifying that the field is stored in the way we expect it to (stored field, ignored source, fallback stored field, etc.)
  • verifying that the field isn't being double stored

These additional checks aren't super sophisticated - I believe we should put more effort into them when we go full columnar.

Copy link
Copy Markdown
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 👍

@Kubik42 Kubik42 merged commit cc95871 into elastic:main Dec 15, 2025
35 checks passed
@Kubik42 Kubik42 deleted the text-fields-store-serialization-fix branch December 15, 2025 15:49
parkertimmins pushed a commit to parkertimmins/elasticsearch that referenced this pull request Dec 17, 2025
…ed source (elastic#139415)

* Removed the logic that defaults store to false in text fields

* Fixed serverless issue

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants