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

logger: Fix cache for ignore_same_log_interval growing unlimitedly #4229

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Jul 6, 2023

Which issue(s) this PR fixes:

What this PR does / why we need it:
With ignore_same_log_interval, the cache can grow unlimitedly.
This limits the size to 1000.

Specification:

  • When the size is over 1000, clear the unneeded caches.
  • If the size is still over, clear all the caches.

If needed, we can make the max size configurable, but for now, I don't think we need it.

Docs Changes:
Adding an explanation to https://docs.fluentd.org/deployment/logging#ignore_same_log_interval is desirable.

Release Note:
Same as the title.

lib/fluent/log.rb Outdated Show resolved Hide resolved
With `ignore_same_log_interval`, the cache can grow unlimitedly.
This limits the size to 1000.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
@daipom daipom force-pushed the fix-log-cache-growing-unlimitedly branch from 8452fb4 to 82fc146 Compare July 7, 2023 00:51
Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Waiting CI...

@ashie ashie modified the milestone: v1.17.0 Jul 7, 2023
@ashie ashie merged commit 09617b4 into fluent:master Jul 7, 2023
13 of 16 checks passed
@ashie
Copy link
Member

ashie commented Jul 7, 2023

Thanks!

@daipom daipom deleted the fix-log-cache-growing-unlimitedly branch July 7, 2023 04:12
@daipom
Copy link
Contributor Author

daipom commented Jul 7, 2023

Thanks for your review!

@daipom daipom added this to the v1.16.2 milestone Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Large Memory Consumption when ignore_same_log_interval
2 participants