Merged
Conversation
By moving DocStats 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.
Collaborator
|
Pinging @elastic/es-distributed |
jasontedor
reviewed
Sep 18, 2018
Member
jasontedor
left a comment
There was a problem hiding this comment.
The change looks good but I left one question about test on the side, which I am fine with being in a follow-up too.
| } | ||
| return new DocsStats(numDocs, numDeletedDocs, sizeInBytes); | ||
| DocsStats docsStats = getEngine().docStats(); | ||
| markSearcherAccessed(); |
Member
There was a problem hiding this comment.
Is there a test for this? It could have gotten lost here. I looked (IndexShardTests#testDocStats) but did not see one. Would you add one?
Contributor
Author
|
@elasticmachine test this please |
Member
|
Nice change - NoOpEngine can benefit from it too |
Member
|
@s1monw Do you plan to do the same thing cor completionStats() too? |
Contributor
Author
|
@tlrx you can read my mind ey :) |
s1monw
added a commit
to s1monw/elasticsearch
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 elastic#33835
s1monw
added a commit
that referenced
this pull request
Sep 19, 2018
By moving DocStats into the engine we can easily cache the stats for read-only engines if necessary. It also moves the responsibility out of IndexShard which has quiet some complexity already.
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Sep 19, 2018
* master: (46 commits) Fixing assertions in integration test (elastic#33833) [CCR] Rename idle_shard_retry_delay to poll_timout in auto follow patterns (elastic#33821) HLRC: Delete ML calendar (elastic#33775) Move DocsStats into Engine (elastic#33835) [Docs] Clarify accessing Date methods in painless (elastic#33560) add elasticsearch-shard tool (elastic#32281) Cut over to unwrap segment reader (elastic#33843) SQL: Fix issue with options for QUERY() and MATCH(). (elastic#33828) Emphasize that filesystem-level backups don't work (elastic#33102) Use the global doc id to generate a random score (elastic#33599) Add minimal sanity checks to custom/scripted similarities. (elastic#33564) Profiler: Don’t profile NEXTDOC for ConstantScoreQuery. (elastic#33196) [CCR] Change FollowIndexAction.Request class to be more user friendly (elastic#33810) SQL: day and month name functions tests locale providers enforcement (elastic#33653) TESTS: Set SO_LINGER = 0 for MockNioTransport (elastic#32560) Test: Relax jarhell gradle test (elastic#33787) [CCR] Fail with a descriptive error if leader index does not exist (elastic#33797) Add ES version 6.4.2 (elastic#33831) MINOR: Remove Some Dead Code in Scripting (elastic#33800) Ensure realtime `_get` and `_termvectors` don't run on the network thread (elastic#33814) ...
s1monw
added a commit
to s1monw/elasticsearch
that referenced
this pull request
Sep 19, 2018
This was lost in elastic#33835
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
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 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 DocStats 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.