don't attempt compaction while still syncing

This commit is contained in:
vyzo 2021-06-16 19:58:18 +03:00
parent 7b02673620
commit 3fe4261f12

View File

@ -439,6 +439,9 @@ func (s *SplitStore) HeadChange(_, apply []*types.TipSet) error {
if err != nil {
log.Warnf("error saving sync gap epoch: %s", err)
}
// don't attempt compaction before we have caught up syncing
return nil
}
if !atomic.CompareAndSwapInt32(&s.compacting, 0, 1) {