Hello, I have about 50-100 keys whose values constantly update, resulting in these few keys eventually taking up multiple GB’s of storage when around 10MB should be enough.
I have tried to add the following func as recommended by the README file:
func badgerGC() {
ticker := time.NewTicker(5 * time.Minute)
defer ticker.Stop()
for range ticker.C {
again:
err := badgerDB.RunValueLogGC(0.5)
if err == nil {
goto again
}
}
}
I have also tried to set RunValueLogGC to other values within the range, such as 0.0, 0.1, 0.7, etc. But it always return: Value log GC attempt didn't result in any cleanup.
Value log GC would only clean up files if there are multiple log files, and they can be cleaned given the threshold. The latest log file is never deleted or rewritten.
Anyway, this behavior should improve with the upcoming release. I’ve made changes in Badger, which result in better and smoother GC behavior.