Skip to content

Commit

Permalink
plugin_proxy: Prevent to execute flush callback on Golang side during…
Browse files Browse the repository at this point in the history
… hot-reloading

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Oct 16, 2023
1 parent a5339d0 commit 9cad57f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/flb_plugin_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ static void proxy_cb_flush(struct flb_event_chunk *event_chunk,
(void) i_ins;
(void) config;

/* To prevent flush callback executions, we need to check the
* status of hot-reloading. The actual problem is: we don't have
* pause procedure/mechanism for output plugin. For now, we just halt the
* flush callback here during hot-reloading is in progress. */
if (config->shutdown_by_hot_reloading == FLB_TRUE) {
flb_trace("[GO] hot-reloading is in progress. Retry flushing");
FLB_OUTPUT_RETURN(FLB_RETRY);
}

#ifdef FLB_HAVE_PROXY_GO
if (ctx->proxy->def->proxy == FLB_PROXY_GOLANG) {
Expand Down

0 comments on commit 9cad57f

Please sign in to comment.