Add points metadata support for archive indices#86655
Merged
ywelsch merged 7 commits intoelastic:masterfrom May 16, 2022
Merged
Add points metadata support for archive indices#86655ywelsch merged 7 commits intoelastic:masterfrom
ywelsch merged 7 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search (Team:Search) |
32 tasks
Contributor
Author
|
@elasticmachine run elasticsearch-ci/bwc |
ywelsch
commented
May 11, 2022
| if (indexSettings.getIndexVersionCreated().isLegacyIndexVersion() | ||
| && indexSettings.getIndexMetadata().isSearchableSnapshot() == false) { | ||
| return Optional.of( | ||
| engineConfig -> new ReadOnlyEngine( |
Contributor
Author
There was a problem hiding this comment.
Archive indices had already been read-only (enforced by write block that can't be removed). We're using ReadOnlyEngine here now that leverages some of the advantages of statically knowing that the index is read only. In particular, it fixes an issue where points are being used by peer recovery, which ReadOnly nicely sidesteps by making the document-based recovery a NOOP.
Contributor
Author
|
Thanks @dnhatn! |
jpountz
reviewed
May 17, 2022
Contributor
jpountz
left a comment
There was a problem hiding this comment.
LGTM too. (Sorry for being late to the party!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Archive indices appear just as regular indices in a cluster, and can be part of index patterns when queried. To allow searches to quickly skip shards of archive indices that might not have relevant data, we're adding support for skipping shards of archive indices here that don't have data falling in the time range being queried. This is critical for the Kibana experience which relies on the date range picker to quickly skip some of the indices in an index pattern.
Doing the actual time-range query on the archive index is much more expensive as on a regular index (as it's using doc-values instead of points to run the query, equating to a full scan of the columnar data). The solution here is to make points metadata available in archive indices, so that the minimum and maximum value can be retrieved in constant time (only a tiny fraction of the full points capabilities).