-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix a bug that causes sources to stall #1136
Conversation
It took me a while to understand the failed test. What happens is the reader returns with The original change was made to fix the blocking of the source actor. It was achieved by making I believe the implementation of the readers can be simplified if |
I can't review this as I've opened the PR, but here's some feedback on your changes @tobim: I'd like to see better documentation on Generally, this works aside from the unit tests as you mentioned. For the proposed reader change, can you show the desired API first? |
I would like to avoid spending more cycles here right now. We have the input load-balancing epic in the backlog and we'll revisit the source and reader design at that point. |
To reproduce the bug, run the following commands without this fix: ``` vast start ``` ``` while true; do sleep 30 cat integration/data/suricat/eve.json done | vast import suricata ```
This was a bit too noisy for verbose logs.
Under certain conditions, events would only be pushed to the importer after a long delay. This happens specifically when starting a new souce. This is caused by the high initial event request for the stream source. Internally, CAF repeatedly invokes the generator callback until all buffers are filled to the desired level, or no new data is put on the downstream buffer. The initial hint for the generator is 100, which multiplied by the default table slice size means the reader needs to produce 100000 events before the slices are forwarded to the node.
0c6d0e0
to
345748c
Compare
I implemented a workaround that fixes the immediate problems at the cost of a bit extra complexity. We plan to change the interaction between the |
I tested this locally. @tobim feel free to approve. Changelog entry lgtm. |
📔 Description
To reproduce the bug, run the following commands without this fix:
PR to be taken over by @tobim, who as per our call has an idea for another improvement.
📝 Checklist
🎯 Review Instructions
n/t