We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
github.com/dgraph-io/badger/v4 v4.2.0
go version go1.21.5 linux/amd64
Yes
Reproduced on multiple machines, including laptop and server.
Re-write a single key multiple time with a big enough value.
Example code:
package main import ( "crypto/rand" "log" "log/slog" "github.com/dgraph-io/badger/v4" ) func main() { dir := "/tmp/badger_test" slog.Warn("starting", slog.String("db_path", dir)) db, err := badger.Open(badger.DefaultOptions(dir)) if err != nil { log.Fatal(err) } data := make([]byte, 10*2<<20) for i := 0; i < 1000; i++ { slog.Info("starting iteration", slog.Int("iteration_number", i)) err = db.Update(func(txn *badger.Txn) error { _, err := rand.Read(data) if err != nil { return err } return txn.Set([]byte("data"), data) }) if err != nil { log.Fatal(err) } if i%100 == 0 { err = db.RunValueLogGC(0.5) if err != nil && err != badger.ErrNoRewrite { log.Fatal(err) } } } }
Expected: The size of the /tmp/badger_test folder to be bounded and not grow.
/tmp/badger_test
Actual: The size of the /tmp/badger_test folder keeps growing.
After running the reproduction:
$ du -h /tmp/badger_test 20G /tmp/badger_test
No response
The text was updated successfully, but these errors were encountered:
Looks to be a duplicate of #2003.
Sorry, something went wrong.
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.
No branches or pull requests
What version of Badger are you using?
github.com/dgraph-io/badger/v4 v4.2.0
What version of Go are you using?
go version go1.21.5 linux/amd64
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, CPU, OS)?
Reproduced on multiple machines, including laptop and server.
What steps will reproduce the bug?
Re-write a single key multiple time with a big enough value.
Example code:
Expected behavior and actual result.
Expected:
The size of the
/tmp/badger_test
folder to be bounded and not grow.Actual:
The size of the
/tmp/badger_test
folder keeps growing.After running the reproduction:
Additional information
No response
The text was updated successfully, but these errors were encountered: