Skip to content

Commit

Permalink
engine: send backlog chunks on shutdown
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
  • Loading branch information
PettitWesley committed Jun 17, 2024
1 parent 79445f7 commit db7cf76
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/flb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ int flb_engine_start(struct flb_config *config)

ret = sb_segregate_chunks(config);

if (ret)
if (ret < 0)
{
flb_error("[engine] could not segregate backlog chunks");
return -2;
Expand Down Expand Up @@ -839,6 +839,11 @@ int flb_engine_start(struct flb_config *config)
if (ret > 0 && config->grace_count < config->grace) {
if (config->grace_count == 1) {
flb_task_running_print(config);
ret = sb_segregate_chunks(config);
if (ret < 0) {
flb_error("[engine] could not segregate backlog chunks");
return -2;
}
}
if ((mem_chunks + fs_chunks) > 0) {
flb_info("[engine] Pending chunk count: memory=%d, filesystem=%d; grace_timer=%d",
Expand Down

0 comments on commit db7cf76

Please sign in to comment.