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

2490 head getter memory leak #2492

Merged
merged 2 commits into from
Aug 31, 2024
Merged

Conversation

tastybento
Copy link
Member

Prevents excessive cache expansion by using a new ExpiringMap that will automatically remove entries after a set period of time.

Addresses #2490

The root cause for the HashMap growth seen in #2490 is that the cache stores every panel that has ever made a request for a head and those entries are never deleted after the panel has been updated with the head (or not). The map continues to grow and store every panel ever for each head. This fixes the issue by giving an absolute max time for any cache - which is really what every cache should be using because otherwise the cache is relying on the server being rebooted.

Heads must be gotten within 5 seconds otherwise the cache is cleared.
Heads that have been retrieved will be kept in cache for 1 day
@tastybento tastybento merged commit e110750 into develop Aug 31, 2024
1 check passed
@tastybento tastybento deleted the 2490_head_getter_memory_leak branch August 31, 2024 16:55
Copy link

sonarcloud bot commented Aug 31, 2024

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.

1 participant