Skip to content
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

fix: Ensure to display version_conflict ES error message as warn - EXO-74730 #233

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

rdenarie
Copy link
Member

When we send analytics to ES, we firstly try to send it in a bulk. If an element of the bulk generates an error in ES, we resend each request of the bulk one by one. If the failed one is the i-st element, then request 1..i-1 will generated a version_conflict_engine_exception. In 6.5, this was seen as a warn, an not generates an error. In 7.0, it is seen as error, and then, like for each error, we try to resend it 5 times before dropping it, which could generate a log of logs.

This commit ensure to not raise an exception in this case :

  • ES answer contains "error":true
  • AND ES answer contains "type":"version_conflict_engine_exception"
  • AND ES anwser concern only one entry.

If we have more than one entry, then we are in a bulk, and we cannot know which entry generated the version conflict, so we have to consider this as an error, and rerun each request separatly.

Resolves meesd-io/meeds#2487

…O-74730

When we send analytics to ES, we firstly try to send it in a bulk.
If an element of the bulk generates an error in ES, we resend each request of the bulk one by one.
If the failed one is the i-st element, then request 1..i-1 will generated a version_conflict_engine_exception.
In 6.5, this was seen as a warn, an not generates an error.
In 7.0, it is seen as error, and then, like for each error, we try to resend it 5 times before dropping it, which could generate a log of logs.

This commit ensure to not raise an exception in this case :
- ES answer contains "error":true
AND ES answer contains "type":"version_conflict_engine_exception"
AND ES anwser concern only one entry.

If we have more than one entry, then we are in a bulk, and we cannot know which entry generated the version conflict, so we have to consider this as an error, and rerun each request separatly.

Resolves meesd-io/meeds#2487
@rdenarie rdenarie requested a review from mkrout October 11, 2024 16:02
Copy link

sonarcloud bot commented Oct 11, 2024

@rdenarie rdenarie merged commit 87fe880 into feature/maintenance Oct 11, 2024
7 checks passed
@rdenarie rdenarie deleted the fix/task-74730 branch October 11, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants