-
Notifications
You must be signed in to change notification settings - Fork 1.8k
out_loki: prevent race conditions when multiple workers use remove_keys #10563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e_Keys Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
|
@edsiper Thank you for the work you've done. |
We are having the same issue where some keys are removed but many are not. Currently on version 4.1.0. EDIT: Reverting back to 4.0.3 fixes the issue and all keys are removed again. |
|
4.1 introduced some nice encoding improvements, so downgrading is not an option for us. But yeah, key removal is flaky now 🤔 |
|
Do you think you could create a repro case for this? I'd like to take a look at it but I'm a bit lost as to how to get started with Loki. |
|
Did some testing, and I see two problems:
|
|
It'd be great if you opened a PR in the documentation repository to make those improvements! |
Thats the case, will try to look into it more, but with workers it's consistent and seems like more likely to appear when line_format is set to json instead of key_value |
Fixes #10560
Added per-thread removal contexts in Loki’s configuration to prevent race conditions when multiple workers use the
Remove_Keysoption. The change introduces a thread-local storage for these contexts and created helper functions to manage them safelyFluent 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.