-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
reload: fix hotreload when running on windows as service. #9908
base: master
Are you sure you want to change the base?
Conversation
This should resolve #9824. |
@@ -266,6 +267,8 @@ struct flb_config { | |||
int enable_hot_reload; | |||
int ensure_thread_safety_on_hot_reloading; | |||
unsigned int hot_reloaded_count; | |||
unsigned int hot_reloaded_failures_count; | |||
volatile sig_atomic_t bin_restarting; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally this code was used to improve the reliability of the reload API so that it could be used in testing:
bin_restarting
was refactored out of thesrc/fluent-bit.c
file to expose it to the reload API to better track the reload state- hot_reloaded_failures_count was added to track failed reloads.
The hot_reloaded_failures_count
is not crucial to this patch and can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edsiper should I drop hot_reloaded_failures_count
and the relevant code?
…nfig. Signed-off-by: Phillip Whelan <[email protected]>
… windows. Signed-off-by: Phillip Whelan <[email protected]>
…load on windows. Signed-off-by: Phillip Whelan <[email protected]>
0e56dd0
to
1a99e51
Compare
Summary
This PR involves several changes which allow both the API and fleet to reload on windows when running fluent-bit as a service.
Description
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
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.