Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't lookup version for auto generated id and create #5785

Closed
wants to merge 3 commits into from

Conversation

kimchy
Copy link
Member

@kimchy kimchy commented Apr 12, 2014

When a create document is executed, and its an auto generated id (based on UUID), we know that the document will not exists in the index, so there is no need to try and lookup the version from the index.
For many cases, like logging, where ids are auto generated, this can improve the indexing performance, specifically for lightweight documents where analysis is not a big part of the execution.

When a create document is executed, and its an auto generated id (based on UUID), we know that the document will not exists in the index, so there is no need to try and lookup the version from the index.
For many cases, like logging, where ids are auto generated, this can improve the indexing performance, specifically for lightweight documents where analysis is not a big part of the execution.
@s1monw
Copy link
Contributor

s1monw commented Apr 12, 2014

I don't think this should go into a bugfix release. It's an optimization rather than a bugfix so we should only push this to 1.2

@kimchy
Copy link
Member Author

kimchy commented Apr 14, 2014

don't have strong feeling about it, update the pull request to check on version 1.2.

@s1monw
Copy link
Contributor

s1monw commented Apr 14, 2014

LGTM

@kimchy
Copy link
Member Author

kimchy commented Apr 14, 2014

pushed.

@kimchy kimchy closed this Apr 14, 2014
@kimchy kimchy deleted the index_auto_generated_id branch April 14, 2014 08:07
@s1monw
Copy link
Contributor

s1monw commented Apr 14, 2014

I reverted this temporarily since it caused test-failures.

@s1monw
Copy link
Contributor

s1monw commented Apr 14, 2014

My suspicion here is that some docs get indexed more than once if we have a recovery situation since we do winged migration ie. index into the new copy and replay from translog so stuff can come in twice.

@kimchy kimchy restored the index_auto_generated_id branch April 14, 2014 15:47
@kimchy
Copy link
Member Author

kimchy commented Apr 15, 2014

fyi, I created a branch on es repo: https://github.com/elasticsearch/elasticsearch/tree/enhacement/index_auto_generated_id, it includes a proposed fix for this (though not very clean)

@clintongormley clintongormley added the :Core/Infra/Core Core issues without another label label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants