Skip to content

Conversation

edsiper
Copy link
Member

@edsiper edsiper commented Jul 9, 2025

Fixes #10560

Added per-thread removal contexts in Loki’s configuration to prevent race conditions when multiple workers use the Remove_Keys option. The change introduces a thread-local storage for these contexts and created helper functions to manage them safely


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.

@edsiper edsiper merged commit cdb6c4a into master Jul 9, 2025
47 of 49 checks passed
@edsiper edsiper deleted the out_loki-thread-safe-mpa branch July 9, 2025 15:39
@railsharipov
Copy link

railsharipov commented Jul 18, 2025

@edsiper Thank you for the work you've done.
I am not sure if this change is the case but it is the only thing that I see that can be related: some keys not getting removed from Loki streams after I have updated to version 4.0.4. It is strange that some keys are removed while others aren't. This is just a guess so let me know if you think this change cannot be the cause.

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.

Inconsistent Remove_Keys behavior when running Loki output with multiple workers / threads
2 participants