-
Notifications
You must be signed in to change notification settings - Fork 801
How do I use retry_on_conflict to resolve error "ConflictError 409" with update()? #1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
using elasticsearch-py directly seems to work...
|
I have the same problem. |
Any update? after adding Any soulution? |
@smurf-U I ended up using above solution |
Hi @burritoIand |
|
This error seems to occur when adding https://github.com/elastic/elasticsearch-dsl-py/blob/7.3.0/elasticsearch_dsl/document.py#L407 Here's a temporary solution: del post.meta['seq_no']
del post.meta['primary_term']
post.update(
retry_on_conflict=10,
date=datetime.utcnow(),
) |
I noticed that if I send too many requests in a short period, my elasticsearch update code throws a 409 ConflictError. Reading a bit into it, I noticed there is a param for update() to set the number of retry attempts, however when I tried using it, I get another error:
How can I handle 409 ConflictError during frequent updates and/or use the retry_on_conflict param?
The text was updated successfully, but these errors were encountered: