From af689a1e1df919953a3afa399cb33ec2fdae09a8 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Thu, 14 Sep 2023 19:14:41 +0900 Subject: [PATCH] plugin_proxy: Handle no ingestion case This is because the recent version of fluent-bit wants to process the ring buffers when nothing ingested but called in the callback. We need to check whether the logs are ingested or not on that line. Signed-off-by: Hiroshi Hatake --- src/flb_plugin_proxy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/flb_plugin_proxy.c b/src/flb_plugin_proxy.c index 0097c50ada6..440c545256c 100644 --- a/src/flb_plugin_proxy.c +++ b/src/flb_plugin_proxy.c @@ -84,6 +84,11 @@ static int flb_proxy_input_cb_collect(struct flb_input_instance *ins, flb_trace("[GO] entering go_collect()"); ret = proxy_go_input_collect(ctx->proxy, &data, &len); + if (len == 0) { + flb_trace("[GO] No logs are ingested"); + return -1; + } + if (ret == -1) { flb_errno(); return -1;