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 a bug that can create oversized frequency sketch when weigher is set #75

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

tatsuya6502
Copy link
Member

Moka v0.7.0 introduced size-aware cache management. However, there is a bug in the logic to estimate the number of keys that the frequency sketch (the LFU filter) would manage, and can create oversized sketch up to two times bigger than necessary. This bug exists only for size-aware cache management.

This PR fixes the bug by trying not to increase the sketch size once estimated.


Relates to #72.

@tatsuya6502 tatsuya6502 self-assigned this Feb 1, 2022
@tatsuya6502 tatsuya6502 added the bug Something isn't working label Feb 1, 2022
@tatsuya6502 tatsuya6502 added this to the v0.7.2 milestone Feb 1, 2022
Copy link
Member Author

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

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

Merging.

@tatsuya6502 tatsuya6502 merged commit 5c936cd into master Feb 1, 2022
@tatsuya6502 tatsuya6502 deleted the fix-freq-skt-size branch February 1, 2022 05:42
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant