Skip to content

Commit

Permalink
In addition to the 409 errros, also ignore valid 201 created document…
Browse files Browse the repository at this point in the history
…s within a "errors=true" elastic bulk response

Signed-off-by: Daniel Steininger <[email protected]>
  • Loading branch information
dsteininger86 authored Jun 19, 2024
1 parent 2bef958 commit 9311604
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/out_es/es.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,11 @@ static int elasticsearch_error_check(struct flb_elasticsearch *ctx,
check = FLB_TRUE;
goto done;
}
/* Check for errors other than version conflict (document already exists) */
if (item_val.via.i64 != 409) {
/*
* Check for errors other than version conflict (document already exists)
* and ignore the created documents.
*/
if (item_val.via.i64 != 409 && item_val.via.i64 != 201) {
check = FLB_TRUE;
goto done;
}
Expand Down

0 comments on commit 9311604

Please sign in to comment.