Move IndexShard#getWritingBytes() under InternalEngine#27209
Merged
s1monw merged 3 commits intoelastic:masterfrom Nov 2, 2017
Merged
Move IndexShard#getWritingBytes() under InternalEngine#27209s1monw merged 3 commits intoelastic:masterfrom
s1monw merged 3 commits intoelastic:masterfrom
Conversation
We do some accouting in IndexShard that is not necessarily correct since we maintain two different index readers. This change moves the accounting under the engine which knows what reader we are refreshing. Relates to elastic#26972
bleskes
suggested changes
Nov 1, 2017
Contributor
bleskes
left a comment
There was a problem hiding this comment.
I left one important comment in index shard. It's a shame we don't have unit tests for this, but this is an existing problem, so I don't want to hold the PR for this.
| @@ -842,19 +836,7 @@ public void refresh(String source) { | |||
| verifyNotClosed(); | |||
|
|
|||
| if (canIndex()) { | |||
Contributor
There was a problem hiding this comment.
empty if clause? also, canIndex always returns true ... so some test should have failed here?
Contributor
Author
There was a problem hiding this comment.
oh I am not sure something should have in this case there are tests for the entire thing but they are not very sophisticated. I also think it's very hard to test.
| return historyUUID; | ||
| } | ||
|
|
||
| /** |
Contributor
There was a problem hiding this comment.
nit: shall we be more concrete and say how much bytes are moving from the indexing buffer to segments?
Contributor
Author
|
@bleskes I pushed changes |
bleskes
approved these changes
Nov 2, 2017
s1monw
added a commit
that referenced
this pull request
Nov 2, 2017
We do some accounting in IndexShard that is not necessarily correct since we maintain two different index readers. This change moves the accounting under the engine which knows what reader we are refreshing. Relates to #26972
martijnvg
added a commit
that referenced
this pull request
Nov 3, 2017
* master: Fixed byte buffer leak in Netty4 request handler Avoid uid creation in ParsedDocument (#27241) Rander sum as zero if count is zero for stats aggregation (#26893) (#27193) Add additional explanations around discovery.zen.ping_timeout (#27231) Remove unused searcher parameter in SearchService#createContext (#27227) Upgrade to Lucene 7.1 (#27225) Move IndexShard#getWritingBytes() under InternalEngine (#27209) Adjust bwc version for exists query tests Introducing took time for _msearch
martijnvg
added a commit
that referenced
this pull request
Nov 3, 2017
* 6.x: Fixed byte buffer leak in Netty4 request handler Avoid uid creation in ParsedDocument (#27241) Upgrade to Lucene 7.1 (#27225) Add additional explanations around discovery.zen.ping_timeout (#27231) Fix compile error Remove unused searcher parameter in SearchService#createContext (#27227) Fix sequence number assertions in BWC tests Move IndexShard#getWritingBytes() under InternalEngine (#27209) Adjust bwc version for exists query tests
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.
We do some accouting in IndexShard that is not necessarily correct since
we maintain two different index readers. This change moves the accounting under
the engine which knows what reader we are refreshing.
Relates to #26972