check yield before GC

This commit is contained in:
zenground0 2023-03-04 07:54:56 -07:00 committed by Phi
parent b5da33c013
commit fd66db680f

View File

@ -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()