Skip to content

Commit

Permalink
Merge pull request #5745 from filecoin-project/feat/splitstore-gc-tuning
Browse files Browse the repository at this point in the history
tune badger gc to repeatedly gc the value log until there is no rewrite
  • Loading branch information
magik6k authored Mar 8, 2021
2 parents c52dae4 + 90741da commit 51ed4c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blockstore/badger/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ func (b *Blockstore) CollectGarbage() error {
return ErrBlockstoreClosed
}

err := b.DB.RunValueLogGC(0.125)
var err error
for err == nil {
err = b.DB.RunValueLogGC(0.125)
}

if err == badger.ErrNoRewrite {
// not really an error in this case
return nil
Expand Down

0 comments on commit 51ed4c7

Please sign in to comment.