Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Support external versioning for deletes arriving before initial update #1351
The versioning feature works well for protecting the index against stale updates due to message reordering (e.g. in a messaging system). However, there is one case not handled properly yet which is when a delete (with external version number) arrives before the first update of the document (with external version number).
Find more on that in this group thread (that asked to file this as enhancement request): https://groups.google.com/d/topic/elasticsearch/QXn1wK01THE/discussion
I moved to 0.17.7 but my little test case is still red. Not sure #1341 really is the same as this issue. This is my test case: I trigger a delete with external version number 2 and then trigger an update with external version 1 (simulating message reordering). I am expecting the update to fail with a version conflict exception but it does succeed. When debugging I see the delete failing with a version conflict (current -1 but expected 2). The update then succeeds.