Avoid uid creation in ParsedDocument#27241
Merged
jasontedor merged 1 commit intoelastic:masterfrom Nov 3, 2017
Merged
Conversation
The `uid` was only used in the `toString` implementation, which I suspect is only used for logging or debugging purposes. So the `uid` creation can be avoided in most cases. This might be a left-over of the work of moving to a single `id` without embedded `type`, because the `uid` is created later on in `IndexShard.prepareIndex` if it is still required.
Collaborator
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Member
|
@elasticmachine test this please |
jasontedor
pushed a commit
that referenced
this pull request
Nov 3, 2017
The uid bytes (as the type#id) were needlessly being created even though they are no longer needed after the move to single type per index. This commit avoids creating these when parsed documents are constructed. Relates #27241
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.
The
uidwas only used in thetoStringimplementation, which Isuspect is only used for logging or debugging purposes. So the
uidcreation can be avoided in most cases.
This might be a left-over of the work of moving to a single
idwithoutembedded
type, because theuidis created later on inIndexShard.prepareIndexif it is still required.