-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
version_conflict_engine_exception with bulk update #17165
Comments
@atm028 Your second update request happened at the same time as another request, so between fetching the document, updating it, and reindexing it, another request made an update. See the |
@clintongormley But single client and single Elasticsearch node has been used and client sent both requests in range of single connection(http 1.1 with keep-alived connection). Where the another process comes from? Or it means that each request handling in own thread? Even from the same connection. |
If you send a request and wait for the response before sending the next request, then they will be executed serially. But I think you've sent more requests than you realise, eg looking at the error message:
...you've made more than one update to that document |
That's true, the second update request has been sent before the first one has been done. But if the requests has been sent in single connection then updates to the document should be enrolled sequentially. And then two responses will be send to the client. Of course if the handling of them works in single thread, since it single connection. At least in code the same thread context used for dispatching request. Doesn't it? |
No. Requests are handled asynchronously. |
@clintongormley ok, thank you, now the reason is clear |
Elasticsearch version:
JVM version:
OS version:
Description of the problem including expected versus actual behavior:
I'm doing the document update with two bulk requests. The first request contains three updates and the second bulk request contains just one.
For the first bulk request the response is completely success but response for the second one said about version conflict.
The first request contains three updates of the document:
Then the second one which contains just one update:
And then the response for first request where all statuses are 200:
And response for the second request with status 409:
Steps to reproduce:
There is no some especial steps for reproduce, and I've observed it just once.
Additional info:
The text was updated successfully, but these errors were encountered: