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

compress Slice when create filemetadata #129

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Salpadding
Copy link

image

when DbImpl used as singleton bean in spring application context for a long time, the oom ex occured
after inspect the heap dump file
i found the actually length of filemetadata.largest.userKey is 33, while size of filemetadata.largest.userKey.data is 10485kb

@wyzhang
Copy link

wyzhang commented Oct 20, 2021

Ran into similar issue. Did some digging.

The root cause is that start and end key maintained per file in FileMetadata are pinning down the entire buffer storing entire key-value. In other words, if the key+val is 10MB, FileMetadata's start/end key references a slice of this 10MB and ends up preventing freeing the buffer.

@wyzhang
Copy link

wyzhang commented Oct 20, 2021

My proposed fix is in this PR: #131

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.

None yet

2 participants