diff --git a/blockstore/splitstore/splitstore_compact.go b/blockstore/splitstore/splitstore_compact.go index 68845a598..c113ec72f 100644 --- a/blockstore/splitstore/splitstore_compact.go +++ b/blockstore/splitstore/splitstore_compact.go @@ -236,7 +236,7 @@ func (s *SplitStore) markLiveRefs(cids []cid.Cid) { log.Errorf("error marking tipset refs: %s", err) } log.Debugw("marking live refs done", "took", time.Since(startMark), "marked", *count) - atomic.AddInt64(szMarked, int64(sz)) + atomic.AddInt64(szMarked, sz) return } @@ -252,7 +252,7 @@ func (s *SplitStore) markLiveRefs(cids []cid.Cid) { if err != nil { return err } - atomic.AddInt64(szMarked, int64(sz)) + atomic.AddInt64(szMarked, sz) } return nil @@ -969,7 +969,7 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp if err != nil { return xerrors.Errorf("error walking messages (cid: %s): %w", hdr.Messages, err) } - atomic.AddInt64(szWalk, int64(sz)) + atomic.AddInt64(szWalk, sz) sz, err = s.walkObjectIncomplete(hdr.ParentMessageReceipts, visitor, fHot, stopWalk) if err != nil { diff --git a/blockstore/splitstore/splitstore_gc.go b/blockstore/splitstore/splitstore_gc.go index c415b74dc..43832a585 100644 --- a/blockstore/splitstore/splitstore_gc.go +++ b/blockstore/splitstore/splitstore_gc.go @@ -37,10 +37,9 @@ func (s *SplitStore) gcHotAfterCompaction() { return 0 } return size - } else { - log.Errorf("Could not measure hotstore size, assuming it is 0 bytes, which it is not") - return 0 } + log.Errorf("Could not measure hotstore size, assuming it is 0 bytes, which it is not") + return 0 } hotSize := getSize()