From 3fe4261f12199f9d6282dda80efd7c8506357803 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 16 Jun 2021 19:58:18 +0300 Subject: [PATCH] don't attempt compaction while still syncing --- blockstore/splitstore/splitstore.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockstore/splitstore/splitstore.go b/blockstore/splitstore/splitstore.go index 660823762..3d7049010 100644 --- a/blockstore/splitstore/splitstore.go +++ b/blockstore/splitstore/splitstore.go @@ -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) {