Skip to content

Conversation

@seblaz
Copy link
Contributor

@seblaz seblaz commented Mar 18, 2024

When a task is not created and the filesystem storage is used, then set the chunk down

Fixes #8395 #7329 #5485 #5217


Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@patrick-stephens
Copy link
Contributor

Looks like this is based off a broken commit on master, can you rebase?
Also fix up the PR title and commit message per the contribution guidelines

@seblaz seblaz reopened this Mar 21, 2024
@seblaz seblaz changed the title When a task is not created and the filesystem storage is used, then set the chunk down engine_dispatch: remove chunks from memory if the task fails to be created Mar 21, 2024
@nikhil-bhat
Copy link

hi @seblaz @patrick-stephens will this fix be backported to older versions of fluentbit.
Also any idea when this fix will be released

…eated

When the tasks_map is filled and the new arriving chunks try to create a new
task, then an error is returned. Additionally, under that condition the new
chunks don't get deleted from memory, and they occupy a space of the
storage.max_chunks_up. Eventually, the new chunks end up using the entire space
of the storage.max_chunks_up. This causes the old chunks that have a task
assigned to be unable to be brought up into memory, and therefore they never
get flushed.

This pr fixes the problem by deleting the new chunks from memory in case they
failed to create a task and the filesystem storage is in use. Additionally, it
runs a check to not bring it up to memory in the first place if possible.

Signed-off-by: seblaz <[email protected]>
Copy link
Contributor

@leonardo-albertovich leonardo-albertovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should be merged ASAP.

Thanks a lot for taking the time to fix this issue Sebastian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fluentbit simply stops when reaches 2048 tasks

6 participants