File tree 2 files changed +7
-0
lines changed 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ struct flb_config {
244
244
int storage_max_chunks_up ; /* max number of chunks 'up' in memory */
245
245
int storage_del_bad_chunks ; /* delete irrecoverable chunks */
246
246
char * storage_bl_mem_limit ; /* storage backlog memory limit */
247
+ int storage_bl_flush_on_shutdown ; /* enable/disable backlog chunks flush on shutdown */
247
248
struct flb_storage_metrics * storage_metrics_ctx ; /* storage metrics context */
248
249
int storage_trim_files ; /* enable/disable file trimming */
249
250
@@ -386,6 +387,8 @@ enum conf_type {
386
387
#define FLB_CONF_STORAGE_METRICS "storage.metrics"
387
388
#define FLB_CONF_STORAGE_CHECKSUM "storage.checksum"
388
389
#define FLB_CONF_STORAGE_BL_MEM_LIMIT "storage.backlog.mem_limit"
390
+ #define FLB_CONF_STORAGE_BL_FLUSH_ON_SHUTDOWN \
391
+ "storage.backlog.flush_on_shutdown"
389
392
#define FLB_CONF_STORAGE_MAX_CHUNKS_UP "storage.max_chunks_up"
390
393
#define FLB_CONF_STORAGE_DELETE_IRRECOVERABLE_CHUNKS \
391
394
"storage.delete_irrecoverable_chunks"
Original file line number Diff line number Diff line change @@ -145,6 +145,9 @@ struct flb_service_config service_configs[] = {
145
145
{FLB_CONF_STORAGE_BL_MEM_LIMIT ,
146
146
FLB_CONF_TYPE_STR ,
147
147
offsetof(struct flb_config , storage_bl_mem_limit )},
148
+ {FLB_CONF_STORAGE_BL_FLUSH_ON_SHUTDOWN ,
149
+ FLB_CONF_TYPE_BOOL ,
150
+ offsetof(struct flb_config , storage_bl_flush_on_shutdown )},
148
151
{FLB_CONF_STORAGE_MAX_CHUNKS_UP ,
149
152
FLB_CONF_TYPE_INT ,
150
153
offsetof(struct flb_config , storage_max_chunks_up )},
@@ -282,6 +285,7 @@ struct flb_config *flb_config_init()
282
285
config -> storage_path = NULL ;
283
286
config -> storage_input_plugin = NULL ;
284
287
config -> storage_metrics = FLB_TRUE ;
288
+ config -> storage_bl_flush_on_shutdown = FLB_FALSE ;
285
289
286
290
config -> sched_cap = FLB_SCHED_CAP ;
287
291
config -> sched_base = FLB_SCHED_BASE ;
You can’t perform that action at this time.
0 commit comments