Update By Query & Version Conflicts

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 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)

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

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