Skip to content

Allow optype CREATE for append-only indexing operations#47169

Merged
ywelsch merged 8 commits intoelastic:masterfrom
ywelsch:append-only-optype-create
Sep 30, 2019
Merged

Allow optype CREATE for append-only indexing operations#47169
ywelsch merged 8 commits intoelastic:masterfrom
ywelsch:append-only-optype-create

Conversation

@ywelsch
Copy link
Copy Markdown
Contributor

@ywelsch ywelsch commented Sep 26, 2019

Bulk requests currently do not allow adding "create" actions with auto-generated IDs. This PR allows using the optype CREATE for append-only indexing operations. This is mainly the user-facing aspect of it. Follow-ups will include:

  • checking whether these should be handled differently at the engine level
  • checking whether the default for POST index/_doc should be the optype CREATE.

@ywelsch ywelsch added >enhancement :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v8.0.0 v7.5.0 labels Sep 26, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

@ywelsch
Copy link
Copy Markdown
Contributor Author

ywelsch commented Sep 26, 2019

@elasticmachine run elasticsearch-ci/2
run elasticsearch-ci/bwc
run elasticsearch-ci/default-distro

@ywelsch
Copy link
Copy Markdown
Contributor Author

ywelsch commented Sep 27, 2019

@elasticmachine run elasticsearch-ci/default-distro

@ywelsch ywelsch marked this pull request as ready for review September 27, 2019 06:23
Copy link
Copy Markdown
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good already. I left a number of smaller comments to consider and/or address.

Comment thread server/src/main/java/org/elasticsearch/action/index/IndexRequest.java Outdated
Comment thread server/src/test/java/org/elasticsearch/document/DocumentActionsIT.java Outdated
Comment thread server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java Outdated
Comment thread server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java Outdated
Comment thread server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java Outdated
Comment thread server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java Outdated
Comment thread qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexingIT.java Outdated
Copy link
Copy Markdown
Contributor Author

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough review. All addressed in 3a31040

Comment thread server/src/main/java/org/elasticsearch/action/index/IndexRequest.java Outdated
Comment thread qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexingIT.java Outdated
Copy link
Copy Markdown
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I think we should hold off on backporting until we have ensured that the engine properly handles op_type create requests with auto-id.

@ywelsch ywelsch merged commit c048c86 into elastic:master Sep 30, 2019
ywelsch added a commit that referenced this pull request Oct 1, 2019
ywelsch added a commit that referenced this pull request Oct 1, 2019
ywelsch added a commit that referenced this pull request Oct 1, 2019
ywelsch added a commit that referenced this pull request Oct 1, 2019
Adds support for handling auto-id requests with optype CREATE. Also simplifies the code
handling this by using the standard indexing path when dealing with possible retry conflicts.

Relates #47169
ywelsch added a commit to ywelsch/elasticsearch that referenced this pull request Oct 2, 2019
Bulk requests currently do not allow adding "create" actions with auto-generated IDs.
This commit allows using the optype CREATE for append-only indexing operations. This is
mainly the user facing aspect of it.
ywelsch added a commit to ywelsch/elasticsearch that referenced this pull request Oct 2, 2019
Adds support for handling auto-id requests with optype CREATE. Also simplifies the code
handling this by using the standard indexing path when dealing with possible retry conflicts.

Relates elastic#47169
ywelsch added a commit that referenced this pull request Oct 2, 2019
Bulk requests currently do not allow adding "create" actions with auto-generated IDs.
This commit allows using the optype CREATE for append-only indexing operations. This is
mainly the user facing aspect of it.
ywelsch added a commit that referenced this pull request Oct 2, 2019
Adds support for handling auto-id requests with optype CREATE. Also simplifies the code
handling this by using the standard indexing path when dealing with possible retry conflicts.

Relates #47169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >enhancement v7.5.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants