-
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
out_s3: always use sync IO mode #6573
Conversation
Signed-off-by: Wesley Pettit <[email protected]>
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.
Looks good! Thanks.
I'm wondering if a long term solution is to have a callback timer emit signal chunks that are ignored in terms of logs, but are used to trigger a special upload coroutine. If flush is triggered and the cb function is called from there then it can use the async network stack. It can also be governed by the FLB_SYNC_TASK option.
The other option may be to have a pseudo event loop used only for the callback timer. It will only have one registered event and will essentially be an "epoll" wait. However it will allow us to opt into the async network stack. It is also compatible with the FLB_SYNC_TASK option. This recipe relies on overriding the u_conn event loop, evl
Then the callback function needs to be split into 2 parts
The coroutine invoker can be based on the following code fluent-bit/include/fluent-bit/flb_output.h Lines 533 to 597 in 9f569b0
Instead of The coroutine can be registered to the event loop. fluent-bit/include/fluent-bit/flb_upstream_conn.h Lines 32 to 34 in eceeb5f
|
Signed-off-by: Wesley Pettit [email protected]
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.
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.