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

fix: lru-weighted-cache mem leak #480

Merged
merged 3 commits into from
Dec 13, 2022
Merged

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Dec 12, 2022

Which issue does this PR close?

Closes #

Rationale for this change

In our test env, OOM happens a lot when memory store is on, when disable it the OOM also disappear, so I suspect the LRU dependence has mem leak bug.

What changes are included in this PR?

Change LRU to https://github.com/marmeladema/clru-rs/, which has more testcases, and smaller amount of unsafe code.

Are there any user-facing changes?

No

How does this change test

Unit tests, and will also check in test env.

Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM

@jiacai2050 jiacai2050 merged commit ec7d891 into apache:main Dec 13, 2022
@jiacai2050 jiacai2050 deleted the fix-mem-cache branch December 13, 2022 07:08
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* fix: lru-weighted-cache mem leak

* return error when cap is 0
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.

2 participants