Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure to display version_conflict ES error message as warn - EX…
…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
- Loading branch information