Version conflict on update_by_query

I'm seeing some behavior that I can't explain...and all the googling I've done indicates it should not be possible. I have a single client application, issuing an update_by_query which updates a few thousand documents....sometimes it fails with "version_conflict_engine_exception" which is fine, and expected. In that event I issue an explicit /_refresh and then re-issue my update_by_query (all serially). My understanding is that the second update_by_query should not ever fail with "version_conflict_engine_exception", but sometimes I see it continue to fail over and over again, reliably. I am 100% confident nothing else is modifying these specific documents during this operation (although other documents in the index will potentially be being modified concurrently). Anyone have any theories? My first thought was that I must be issuing more updates than I thought I was, but I have verified that is not the case....sooooo confused :confused:

FYI, for archaeological purposes...it looks like my problem was caused by previously timed out update operations. I had previously issued an update_by_query which took a long time to execute and it timed out on the client side, but apparently was still executing on the server side. Then when I attempted to issue this new update_by_query it conflicted over and over again with the background/unknown/mystery process that was still running on the server. After changing my update_by_query calls to use wait_for_completion=false and monitoring for completion using the task (thus eliminating the timeout) the problem has disappeared.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.