S3 refactor timer coros => change to store timer coros on flb_sched struct#28
Conversation
…t async timers on the sched Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
c20a8f9 to
8576725
Compare
| uint16_t in_table_id[512]; | ||
|
|
||
| void *sched; | ||
| struct flb_sched *sched; |
There was a problem hiding this comment.
Wonder why this is a void * in the first place. Seems like all pointers are void * in this file. I'd keep it void * unless we understand this convention and have a reason to break it.
There was a problem hiding this comment.
void * is useful if at compile time it could store multiple different structs. Here its always one struct, so there's no good reason AFAIK for it to be void.
| /* Each event loop has a scheduler instance */ | ||
| struct flb_sched *sched; |
There was a problem hiding this comment.
Calling out that this is the central change in this pr
matthewfala
left a comment
There was a problem hiding this comment.
These changes look great! There may be a typo here: flb_async_timer_cleanup(config->sched->async_timer_list_destroy)
as it may need to be (config->sched)
| flb_sched_timer_cleanup(config->sched); | ||
| flb_upstream_conn_pending_destroy_list(&config->upstreams); | ||
| flb_output_async_timer_cleanup(config); | ||
| flb_async_timer_cleanup(config->sched->async_timer_list_destroy); |
There was a problem hiding this comment.
Typo? Should this be config->sched
|
|
||
| mk_list_foreach_safe(head, tmp, destroy_list) { | ||
| async_timer = mk_list_entry(head, struct flb_out_async_timer, _head); | ||
| async_timer = mk_list_entry(head, struct flb_async_timer, _head); |
There was a problem hiding this comment.
TODO: need to acquire mutex every time the engine reads or the worker thread writes/deletes.
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
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.