Merge pull request #5745 from filecoin-project/feat/splitstore-gc-tuning

tune badger gc to repeatedly gc the value log until there is no rewrite
This commit is contained in:
Łukasz Magiera 2021-03-08 21:01:14 +01:00 committed by GitHub
commit 51ed4c7b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,7 +137,11 @@ func (b *Blockstore) CollectGarbage() error {
return ErrBlockstoreClosed return ErrBlockstoreClosed
} }
err := b.DB.RunValueLogGC(0.125) var err error
for err == nil {
err = b.DB.RunValueLogGC(0.125)
}
if err == badger.ErrNoRewrite { if err == badger.ErrNoRewrite {
// not really an error in this case // not really an error in this case
return nil return nil