Skip to content

Commit

Permalink
check yield before GC
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGround0 committed Mar 20, 2023
1 parent 4561a0e commit 4880d20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blockstore/splitstore/splitstore_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func (s *SplitStore) gcHotAfterCompaction() {
}

func (s *SplitStore) gcBlockstore(b bstore.Blockstore, opts []bstore.BlockstoreGCOption) error {
if err := s.checkYield(); err != nil {
return err
}
if gc, ok := b.(bstore.BlockstoreGC); ok {
log.Info("garbage collecting blockstore")
startGC := time.Now()
Expand Down

0 comments on commit 4880d20

Please sign in to comment.