File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -461,8 +461,11 @@ def insert_individual_records(recs):
461461 # Successful -> exit the loop
462462 break
463463 except elasticsearch .helpers .BulkIndexError as e :
464+ # VD-7482: this is something we may accept, e.g the document is way too big - just don't crash.
464465 self .logger .error (f"BulkIndexError on attempt { attempt + 1 } : { e .errors } " )
465- raise # Re-raise the BulkIndexError as it's not a connection issue
466+ failed_records = insert_individual_records (records )
467+ if failed_records :
468+ self .logger .error (f"Failed to insert { len (failed_records )} records even in individual mode (bulk error). Ignore error" )
466469 except elasticsearch .exceptions .ConnectionTimeout as e :
467470 if attempt < MAX_RETRIES - 1 :
468471 self .logger .warning (f"ConnectionTimeout on attempt { attempt + 1 } . Retrying in { RETRY_DELAY } seconds..." )
You can’t perform that action at this time.
0 commit comments