Move CompletionStats into the Engine#33847
Merged
s1monw merged 7 commits intoelastic:masterfrom Sep 19, 2018
Merged
Conversation
By moving CompletionStats into the engine we can easily cache the stats for read-only engines if necessary. It also moves the responsibiltiy out of IndexShard which has quiet some complexity already. Relates to elastic#33835
Collaborator
|
Pinging @elastic/es-distributed |
tlrx
approved these changes
Sep 19, 2018
Member
tlrx
left a comment
There was a problem hiding this comment.
LGTM, thanks. I left a minor comment
| if (terms instanceof CompletionTerms) { | ||
| // TODO: currently we load up the suggester for reporting its size | ||
| long fstSize = ((CompletionTerms) terms).suggester().ramBytesUsed(); | ||
| if (fieldNamePatterns != null && fieldNamePatterns.length > 0 && Regex.simpleMatch(fieldNamePatterns, info.name)) { |
Member
There was a problem hiding this comment.
Nit: we don't need to check for non null non empty string array here as Regex.simpleMatch(fieldNamePatterns, info.name) takes care of it
s1monw
added a commit
that referenced
this pull request
Sep 19, 2018
By moving CompletionStats into the engine we can easily cache the stats for read-only engines if necessary. It also moves the responsibiltiy out of IndexShard which has quiet some complexity already. Relates to #33835
s1monw
added a commit
to s1monw/elasticsearch
that referenced
this pull request
Mar 26, 2019
Completion and DocStats are pulled from internal readers instead of external since elastic#33835 and elastic#33847 which doesn't require us to refresh after a stats call since refreshes will happen internally anyhow and that will cause updated stats on ongoing indexing.
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this pull request
May 27, 2019
Completion and DocStats are pulled from internal readers instead of external since elastic#33835 and elastic#33847 which doesn't require us to refresh after a stats call since refreshes will happen internally anyhow and that will cause updated stats on ongoing indexing.
This was referenced Feb 5, 2020
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.
By moving CompletionStats into the engine we can easily cache the stats for
read-only engines if necessary. It also moves the responsibiltiy out of IndexShard
which has quiet some complexity already.
Relates to #33835