Skip to content

Commit

Permalink
plugin_proxy: Handle no ingestion case (#7922)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cosmo0920 authored Sep 23, 2023
1 parent 8d54063 commit 85be089
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flb_plugin_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85be089

Please sign in to comment.