badger
badger copied to clipboard
fix(table cache) block cache logic for table with no compression
Problem
Fixes #2021.
The problem is in the block()
function in table.go. blk.data
takes a slice of the t.Data. If there is no decryption or decompression, it will hold this slice and added to the cache, which means it will always hold a reference of t.Data. That will also preventing GC of the mmap file buffer, so long as a block of it is in cache.
Solution
Make a copy of the block data, when no decryption nor compression.
Deploy Preview for badger-docs ready!
Name | Link |
---|---|
Latest commit | d01e622973593d0a2abdcbe177a6770ce063984b |
Latest deploy log | https://app.netlify.com/sites/badger-docs/deploys/652e5431236ac00008d3dbc0 |
Deploy Preview | https://deploy-preview-2022--badger-docs.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This PR has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.