also gc in compactFull, not just compactSimple

This commit is contained in:
vyzo 2021-03-08 18:30:09 +02:00
parent 8562a9bb82
commit 52de95d344

View File

@ -1016,6 +1016,17 @@ func (s *SplitStore) compactFull(curTs *types.TipSet) error {
return xerrors.Errorf("error syncing tracker: %w", err)
}
if gc, ok := s.hot.(interface{ GC() error }); ok {
log.Infof("garbage collecting hotstore")
startGC := time.Now()
err = gc.GC()
if err != nil {
log.Warnf("error garbage collecting hotstore: %s", err)
} else {
log.Infow("garbage collecting done", "took", time.Since(startGC))
}
}
err = s.setBaseEpoch(coldEpoch)
if err != nil {
return xerrors.Errorf("error saving base epoch: %w", err)