# Update By Query & Version Conflicts

**URL:** https://discuss.elastic.co/t/update-by-query-version-conflicts/202054
**Category:** Elasticsearch
**Created:** [October 2, 2019, 9:06pm UTC](https://discuss.elastic.co/t/update-by-query-version-conflicts/202054 "2019-10-02T21:06:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_White](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_white/32/32674_2.png) [@Chris\_White](https://discuss.elastic.co/u/Chris_White)
#### Post date: [October 2, 2019, 9:06pm UTC](https://discuss.elastic.co/t/update-by-query-version-conflicts/202054/1 "2019-10-02T21:06:33Z")

</div>

I've just been stung by running an update-by-query where the Java Client API (High Level REST) has a query build method of setMaxRetries - but in fact update-by-query does not support retries - it's up to the developer to check the response for version conflicts count and manually re-run the update-by-query.

Ive found [this ticket](https://github.com/elastic/elasticsearch/issues/22723) which notes:

> `_update_by_query` doesn't have a retry feature because it'd be fiddly to implement. I don't think it'd be impossible just time consuming to get right.

So is there a historic reason why UpdateByQuery doesn't override the AbstractBulkByScroll.setMaxRetries method to throw an IllegalArgumentException or something similar to hopefully warn developers during testing that this method has no effect for update-by-query?

Happy to create a ticket, but wanted to dig into it first.

(ES 7.1.0)

---

<div class="post-metadata">

### Author: ![Chris\_White](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_white/32/32674_2.png) [@Chris\_White](https://discuss.elastic.co/u/Chris_White)
#### Post date: [October 7, 2019, 3:59pm UTC](https://discuss.elastic.co/t/update-by-query-version-conflicts/202054/2 "2019-10-07T15:59:46Z")

</div>

created a ticket due to lack of interest here: [https://github.com/elastic/elasticsearch/issues/47674](https://github.com/elastic/elasticsearch/issues/47674)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 4, 2019, 3:59pm UTC](https://discuss.elastic.co/t/update-by-query-version-conflicts/202054/3 "2019-11-04T15:59:52Z")

</div>

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