share a concurrent visitor between workers in markLiveRefs

This commit is contained in:
vyzo 2022-02-01 21:40:09 +02:00
parent 4b4104e400
commit c1d8368fdc

View File

@ -190,8 +190,9 @@ func (s *SplitStore) markLiveRefs(cids []cid.Cid) {
startMark := time.Now()
count := new(int32)
visitor := newConcurrentVisitor()
walkObject := func(c cid.Cid) error {
return s.walkObjectIncomplete(c, newTmpVisitor(),
return s.walkObjectIncomplete(c, visitor,
func(c cid.Cid) error {
if isUnitaryObject(c) {
return errStopWalk