Commit ae0c77c
committed
input_chunk: set maximum input chunk size with configuration parameter
Added new function 'flb_input_chunk_get_max_size' that retrieves value
of the 'storage.max_chunk_size' parameter from the fluent-bit configuration
or sets default value of FLB_INPUT_CHUNK_FS_MAX_SIZE (when user have not set
parameter or there is any problem in parsing). Function is exposed to other
modules and can be used anywhere to get 'storage.max_chunk_size' parameter.
Light optimization: validation of available space in buffer now uses integer
division instead of floating point multiplication (should be faster).
Signed-off-by: Castor Sky <csky57@gmail.com>1 parent a5a3850 commit ae0c77c
2 files changed
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
2632 | 2633 | | |
2633 | 2634 | | |
2634 | 2635 | | |
| 2636 | + | |
2635 | 2637 | | |
2636 | 2638 | | |
2637 | 2639 | | |
| |||
2828 | 2830 | | |
2829 | 2831 | | |
2830 | 2832 | | |
2831 | | - | |
2832 | | - | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2833 | 2836 | | |
2834 | 2837 | | |
2835 | 2838 | | |
| |||
2896 | 2899 | | |
2897 | 2900 | | |
2898 | 2901 | | |
2899 | | - | |
2900 | | - | |
| 2902 | + | |
| 2903 | + | |
2901 | 2904 | | |
2902 | 2905 | | |
2903 | 2906 | | |
| |||
3286 | 3289 | | |
3287 | 3290 | | |
3288 | 3291 | | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
0 commit comments