check yield before GC
This commit is contained in:
parent
b5da33c013
commit
fd66db680f
@ -65,6 +65,9 @@ func (s *SplitStore) gcHotAfterCompaction() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *SplitStore) gcBlockstore(b bstore.Blockstore, opts []bstore.BlockstoreGCOption) error {
|
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 {
|
if gc, ok := b.(bstore.BlockstoreGC); ok {
|
||||||
log.Info("garbage collecting blockstore")
|
log.Info("garbage collecting blockstore")
|
||||||
startGC := time.Now()
|
startGC := time.Now()
|
||||||
|
Loading…
Reference in New Issue
Block a user