Ensure doc_stats are changing even if refresh is disabled#27505
Merged
s1monw merged 5 commits intoelastic:masterfrom Nov 25, 2017
Merged
Ensure doc_stats are changing even if refresh is disabled#27505s1monw merged 5 commits intoelastic:masterfrom
doc_stats are changing even if refresh is disabled#27505s1monw merged 5 commits intoelastic:masterfrom
Conversation
Today if refresh is disabled the doc stats are not updated anymore. In a bulk index scenario this might cause confusion since even if we refresh internal readers etc. doc stats are never advancing. This change cuts over to the internal reader that is refreshed outside of the external readers refresh interval but always equally `fresh` or `fresher` which will cause less confusion.
bleskes
previously requested changes
Nov 23, 2017
Contributor
bleskes
left a comment
There was a problem hiding this comment.
Looks great. A unit tests would be lovely.
Contributor
Author
|
@bleskes there was a test, I beefed it up |
jpountz
approved these changes
Nov 24, 2017
| * If no SegmentReader can be extracted an {@link IllegalStateException} is thrown. | ||
| */ | ||
| protected static SegmentReader segmentReader(LeafReader reader) { | ||
| public static SegmentReader segmentReader(LeafReader reader) { |
Contributor
There was a problem hiding this comment.
nit: If this utility method get more use-cases, I'd move it to a separate class, like maybe the "Lucene" class in that case?
we have a test, and @jpoutz reviewed and approved. Thanks for the review
s1monw
added a commit
that referenced
this pull request
Nov 25, 2017
Today if refresh is disabled the doc stats are not updated anymore. In a bulk index scenario this might cause confusion since even if we refresh internal readers etc. doc stats are never advancing. This change cuts over to the internal reader that is refreshed outside of the external readers refresh interval but always equally `fresh` or `fresher` which will cause less confusion.
s1monw
added a commit
that referenced
this pull request
Nov 25, 2017
Today if refresh is disabled the doc stats are not updated anymore. In a bulk index scenario this might cause confusion since even if we refresh internal readers etc. doc stats are never advancing. This change cuts over to the internal reader that is refreshed outside of the external readers refresh interval but always equally `fresh` or `fresher` which will cause less confusion.
jasontedor
added a commit
that referenced
this pull request
Nov 27, 2017
* master: Skip shard refreshes if shard is `search idle` (#27500) Remove workaround in translog rest test (#27530) inner_hits: Return an empty _source for nested inner hit when filtering on a field that doesn't exist. percolator: Avoid TooManyClauses exception if number of terms / ranges is exactly equal to 1024 Dedup translog operations by reading in reverse (#27268) Ensure logging is configured for CLI commands Ensure `doc_stats` are changing even if refresh is disabled (#27505) Fix classes that can exit Revert "Adjust CombinedDeletionPolicy for multiple commits (#27456)" Transpose expected and actual, and remove duplicate info from message. (#27515) [DOCS] Fixed broken link in breaking changes
jasontedor
added a commit
that referenced
this pull request
Nov 27, 2017
* 6.x: [DOCS] s/Spitting/Splitting in split index docs inner_hits: Return an empty _source for nested inner hit when filtering on a field that doesn't exist. percolator: Avoid TooManyClauses exception if number of terms / ranges is exactly equal to 1024 Dedup translog operations by reading in reverse (#27268) Ensure logging is configured for CLI commands Ensure `doc_stats` are changing even if refresh is disabled (#27505) Fix classes that can exit Revert "Adjust CombinedDeletionPolicy for multiple commits (#27456)" Transpose expected and actual, and remove duplicate info from message.
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.
Today if refresh is disabled the doc stats are not updated anymore.
In a bulk index scenario this might cause confusion since even if
we refresh internal readers etc. doc stats are never advancing.
This change cuts over to the internal reader that is refreshed outside
of the external readers refresh interval but always equally
freshorfresherwhich will cause less confusion.