Skip to content
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

[8.x] Don't skip shards in coord rewrite if timestamp is an alias (#117271) #117912

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

javanna
Copy link
Member

@javanna javanna commented Dec 3, 2024

Backports the following commits to 8.x:

…astic#117271)

The coordinator rewrite has logic to skip indices if the provided date range
filter is not within the min and max range of all of its shards. This mechanism
is enabled for event.ingested and @timestamp fields, against searchable snapshots.

We have basic checks that such fields need to be of date field type, yet if they
are defined as alias of a date field, their range will be empty, which indicates
that the shards are empty, and the coord rewrite logic resolves the alias and
ends up skipping shards that may have matching docs.

This commit adds an explicit check that declares the range UNKNOWN instead of EMPTY
in these circumstances. The same check is also performed in the coord rewrite logic,
so that shards are no longer skipped by mistake.
@javanna javanna added backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Search Foundations/Search Catch all for Search Foundations v8.18.0 labels Dec 3, 2024
@elasticsearchmachine elasticsearchmachine merged commit 2205461 into elastic:8.x Dec 3, 2024
15 checks passed
@javanna javanna deleted the backport/8.x/pr-117271 branch December 3, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Search Foundations/Search Catch all for Search Foundations v8.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants