-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Genji are you using?
$ genji version v0.14.1
What did you do?
Related issue: https://discuss.dgraph.io/t/badgerdb-consume-too-much-disk-space/17070/2
This problem is caused when Transaction Commit, the Transaction doesn't call tx.Discard() then cause badger gc doesn't work. Since the badger API said:
// When you create a new transaction, it is absolutely essential to call
// Discard(). This should be done irrespective of what the update param is set
// to. Commit API internally runs Discard, but running it twice wouldn't cause
// any issues.
//
// txn := db.NewTransaction(false)
// defer txn.Discard()
// // Call various APIs.
func (db *DB) NewTransaction(update bool) *Txn {
return db.newTransaction(update, false)
}But badgerengine doesn't call txn.Discard() before txn.Commit
What did you expect to see?
Release disk space after I delete data and badger gc finish.
What did you see instead?
genjidb with badgerdb consume too much disk space and badger gc doesn't work.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
