parallel: report progress for StreamTrees

This assigns an id to each tree root and then keeps track of how many
tree loads (i.e. trees referenced for the first time) are pending per
tree root. Once a tree root and its subtrees were fully processed there
are no more pending tree loads and the tree root is reported as
processed.
This commit is contained in:
Michael Eischer
2020-11-17 22:37:57 +01:00
committed by Alexander Neumann
parent 3d6a3e2555
commit 258ce0c1e5
4 changed files with 44 additions and 18 deletions

View File

@@ -376,7 +376,7 @@ func (c *Checker) Structure(ctx context.Context, errChan chan<- error) {
c.blobRefs.M.Insert(h)
c.blobRefs.Unlock()
return blobReferenced
})
}, nil)
defer close(errChan)
for i := 0; i < defaultParallelism; i++ {