From 93116040e742d3a73683f50670b73dfa912f722c Mon Sep 17 00:00:00 2001 From: Daniel Steininger <145440428+dsteininger86@users.noreply.github.com> Date: Wed, 19 Jun 2024 07:54:13 +0200 Subject: [PATCH] In addition to the 409 errros, also ignore valid 201 created documents within a "errors=true" elastic bulk response Signed-off-by: Daniel Steininger <145440428+dsteininger86@users.noreply.github.com> --- plugins/out_es/es.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/out_es/es.c b/plugins/out_es/es.c index 5d6a428992a..5135d5504a0 100644 --- a/plugins/out_es/es.c +++ b/plugins/out_es/es.c @@ -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; }