Add warning log when the number of tasks stored in memory exceeds the configured threshold.#126
Merged
alexcams merged 3 commits intoFeb 3, 2026
Conversation
… configured threshold
andsel
requested changes
Feb 3, 2026
andsel
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
@andsel Thanks for the review and pointing the missing docs and version! |
andsel
requested changes
Feb 3, 2026
andsel
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.