Problem Description
Connectors contain logic here that collects documents to bulk operations and then sends batches into Elasticsearch.
There is a todo in the code:
# TODO: retry 429s for individual items here
It is possible that the whole request will return 200, but individual items within this request will be marked as failed - e.g. you've sent 500 items and 3 of them returned 429 because EIS or ML node was unable to process them.
So we need to add logic that collects all items that failed ingestion in the batch and retry them a couple times. Actual implementation of this needs to be discusssed.
Proposed Solution
When bulk request returns successful status but individual items are not successful these items need to be retried - either combined with more items from the queue or just these items alone. If after a couple attempts ingestion fails these items should be dropped with a log line.
Additional Context
Be mindful of Error Monitor in _process_bulk_response - it counts failed items and makes a decision to drop some items, this logic should only execute after retrying of the ingestion happened
Problem Description
Connectors contain logic here that collects documents to bulk operations and then sends batches into Elasticsearch.
There is a todo in the code:
It is possible that the whole request will return 200, but individual items within this request will be marked as failed - e.g. you've sent 500 items and 3 of them returned 429 because EIS or ML node was unable to process them.
So we need to add logic that collects all items that failed ingestion in the batch and retry them a couple times. Actual implementation of this needs to be discusssed.
Proposed Solution
When bulk request returns successful status but individual items are not successful these items need to be retried - either combined with more items from the queue or just these items alone. If after a couple attempts ingestion fails these items should be dropped with a log line.
Additional Context
Be mindful of Error Monitor in _process_bulk_response - it counts failed items and makes a decision to drop some items, this logic should only execute after retrying of the ingestion happened