Skip to content
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

Bug/Time-machine exits before all the records have been comited to DB #146

Closed
buixor opened this issue Jul 24, 2020 · 1 comment
Closed
Labels
kind/bug Something isn't working

Comments

@buixor
Copy link
Contributor

buixor commented Jul 24, 2020

Describe the bug
When processing logs in time-machine mode, crowdsec signals all the go-routines to exit once the acquisition is finished.
However, sometime, overflows might be still waiting to be pushed to DB (ie. bucket is still sending its overflow) and the shutdown mechanism doesn't check for this (it happens specifically if a very high % of your logs lead to an overflow being written to DB).

A better solution would be to monitor the number of "live" buckets before deciding if we can exit properly.

To Reproduce
Process a log with a high ratio of logs leading to overflow (ie. trigger scenario).
At the end of the run, not all the overflows are written to database.

Technical Information (please complete the following information):

  • Version: 0.3.0-rc0
@buixor buixor added the kind/bug Something isn't working label Jul 24, 2020
@buixor
Copy link
Contributor Author

buixor commented Jul 28, 2020

fixed in #148

@buixor buixor closed this as completed Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant