You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi! We are using NutsDB as a temporary KV store on disk. We create the database, use it for a short period (few seconds up to a few minutes) and close it.
After running for a few hours we started to notice the memory growing constantly across runs. We ran a profiler to detect the issue and it shows createNewBufferWithSize is the cause:
I setup a quick test to benchmark and take a look inside:
Describe the bug
Hi! We are using NutsDB as a temporary KV store on disk. We create the database, use it for a short period (few seconds up to a few minutes) and close it.
After running for a few hours we started to notice the memory growing constantly across runs. We ran a profiler to detect the issue and it shows
createNewBufferWithSize
is the cause:I setup a quick test to benchmark and take a look inside:
Note that I don't even run any transactions here. I am confused to why would it even leak. In our real code we do run some operations on init.
Ran it:
Looking at the mem profile I could see it does grow a lot only be running it 10 times:
Adding
nutsdb.WithGCWhenClose(true)
helps but this is still a problem:Only adding
nutsdb.WithCommitBufferSize(0)
reduces it to a normal size:To Reproduce
Steps to reproduce the behavior(Be specific!):
Use the test and commands above.
Give sample code if you can.
Expected behavior
A clear and concise description of what you expected to happen.
What actually happens
A clear and concise description of what actually happens.
Screenshots
If applicable, add screenshots to help explain your problem.
please complete the following information :
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: