I am using the rest client to update some documents and got some version conflict issues. I then added a call to retryOnConflict(3)
when creating the UpdateRequest
. However, I still got some conflicts like below:
exception [type=version_conflict_engine_exception, reason=[myDocId]: version conflict, document already exists (current version [1])]]
The puzzling thing to me here is the currrent version is 1. Since i set retries to 3, it seems like the current version reported in the exception should be have been much higher before Elasticsearch gives up and returns a failure. I debugged my code and confirmed the json content the rest client builds contains the retry parameter. Scripted updates in bulk requests are being done, but otherwise nothing special.
Is this just an issue of a misleading error message or maybe something else is going on?