Skip to content

Commit

Permalink
config: added chunkio trimming support
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich authored and edsiper committed Sep 21, 2023
1 parent a0c5021 commit d51231c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/fluent-bit/flb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ struct flb_config {
int storage_del_bad_chunks; /* delete irrecoverable chunks */
char *storage_bl_mem_limit; /* storage backlog memory limit */
struct flb_storage_metrics *storage_metrics_ctx; /* storage metrics context */
int storage_trim_files; /* enable/disable file trimming */

/* Embedded SQL Database support (SQLite3) */
#ifdef FLB_HAVE_SQLDB
Expand Down Expand Up @@ -355,6 +356,7 @@ enum conf_type {
#define FLB_CONF_STORAGE_MAX_CHUNKS_UP "storage.max_chunks_up"
#define FLB_CONF_STORAGE_DELETE_IRRECOVERABLE_CHUNKS \
"storage.delete_irrecoverable_chunks"
#define FLB_CONF_STORAGE_TRIM_FILES "storage.trim_files"

/* Coroutines */
#define FLB_CONF_STR_CORO_STACK_SIZE "Coro_Stack_Size"
Expand Down
3 changes: 3 additions & 0 deletions src/flb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ struct flb_service_config service_configs[] = {
{FLB_CONF_STORAGE_DELETE_IRRECOVERABLE_CHUNKS,
FLB_CONF_TYPE_BOOL,
offsetof(struct flb_config, storage_del_bad_chunks)},
{FLB_CONF_STORAGE_TRIM_FILES,
FLB_CONF_TYPE_BOOL,
offsetof(struct flb_config, storage_trim_files)},

/* Coroutines */
{FLB_CONF_STR_CORO_STACK_SIZE,
Expand Down

0 comments on commit d51231c

Please sign in to comment.