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

[BUG]: when compression is none block cache will cache the table #2021

Open
hugy718 opened this issue Oct 17, 2023 · 0 comments · May be fixed by #2022
Open

[BUG]: when compression is none block cache will cache the table #2021

hugy718 opened this issue Oct 17, 2023 · 0 comments · May be fixed by #2022
Labels
kind/bug Something is broken.

Comments

@hugy718
Copy link
Contributor

hugy718 commented Oct 17, 2023

What version of Badger are you using?

fb1b009

What version of Go are you using?

1.19.5

Have you tried reproducing the issue with the latest release?

Yes

What is the hardware spec (RAM, CPU, OS)?

ubuntu

What steps will reproduce the bug?

Simply create a large table with no compression. Set the table option with a cache. Then load a block from the table with block(). Check its size with size(). You should see its size is the table size.

Expected behavior and actual result.

the block size should be just the block. Note that the this size is also used to set the cache cost, this will quickly fill the table cache.

Additional information

I submitted a PR to fix it. You can use the added unit test to see this bug.

@hugy718 hugy718 added the kind/bug Something is broken. label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

Successfully merging a pull request may close this issue.

1 participant