-
Notifications
You must be signed in to change notification settings - Fork 39
Add warning log when the number of tasks stored in memory exceeds the configured threshold. #126
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
Conversation
… configured threshold
andsel
left a comment
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.
I've asked for some clarification on the concurrency update of the internal counter.
The PR is missing:
- update of the version in `logstash-filter-aggregate.gemspec``
- documenting the 2 config parameter introduced
|
@andsel Thanks for the review and pointing the missing docs and version! |
andsel
left a comment
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.
Last nitpick :-) I promise.
However given that this is a new feature and not a bugfix I would increase the minor version and not the patch one. So switch version number from 2.10.1 to 2.11.0.
andsel
left a comment
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.
LGTM!
This PR introduces a new feature to log a warning when the number of tasks stored in memory exceeds the configured threshold.
Two new config parameters have been added:
map_count_warning_threshold: The max number of tasks that can be stored in memory simultaneously before warning. The warning message will be repeated every 20% of the configured threshold.Added Unit tests and also tested manually with following config:
The config generates 50 task events, configuring threshold to 5 and repeating the log after every 20% of 5 (1). This should generate 5 warning logs, one every 5 events after first 5 tasks:
Tested with bigger thresholds as well.