-
Notifications
You must be signed in to change notification settings - Fork 1.9k
engine: context event loop. #10244
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
Draft
pwhelan
wants to merge
15
commits into
master
Choose a base branch
from
pwhelan-event-reload
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
engine: context event loop. #10244
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c46ee81
config: add new context loop and channel for context signals.
pwhelan 61a349c
engine: initialize the context event loop (used for internal signals).
pwhelan d73a36c
fluent-bit: refactor main event loop to use context signals.
pwhelan 28cb456
http_server: reload: refactor to use context signals.
pwhelan 66b464d
in_calyptia_fleet: refactor to use context signals.
pwhelan 12f9daf
fluent-bit: refactor signal handlers to use context signals for shutd…
pwhelan 70736d7
engine: destroy channel and event loop for context signals.
pwhelan ba31763
engine: refactor ctx_signal_type to use uin64_t instead of an enum.
pwhelan fd7e9f2
config: use helper functions to send config channel signals.
pwhelan 52c0a69
engine: define constant for config context event loop.
pwhelan 36cf66a
engine: compare explicitly against NULL before deallocationg config c…
pwhelan 94deb77
main: redefine ch_context_signal as flb_pipefd_t.
pwhelan 2641693
main: use FLB_TRUE and FLB_FALSE with is_shutdown.
pwhelan d498ed4
main: set flb_bin_restarting to FLB_RELOAD_ABORTED upon error.
pwhelan e4b60e6
main: add is_reload flag to espace event loop upon reload.
pwhelan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can't call
flb_pipe_wfrom a signal handler. That's why I said you were working on something similar in PR #10275.Uh oh!
There was an error while loading. Please reload this page.
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.
That was an experiment to see what could be done to avoid using atomic variables as signal flags. I obvioulsy crashed head first into the fact that EINTR will interrupt and basically drop the events from the queue before they can be emitted.
I think the only real way around using atomic variables will be to add support for signal events to monkey. I was hoping to avoid it but I at least cannot see another way through.
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.
That's why I tagged you in that other PR.
I think what he did with the signal queue is correct but we need to do it using the platform agnostic atomic operation wrapper which we need to move from
cmetricstocfl(I thought that was already done but it seems I was wrong).I think with that, the signal mask tweak and a bit of elbow grease to ensure that the mechanism is tidy we should be good.
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.
Were you able to make any progress on this? Do you need anything from me?