mirror of
https://github.com/octoleo/restic.git
synced 2024-12-26 20:30:19 +00:00
checker: Reduce cost of debug log
Avoid duplicate allocation of the Subtree list.
This commit is contained in:
parent
70f4c014ef
commit
c66a0e408c
@ -535,8 +535,9 @@ func filterTrees(ctx context.Context, backlog restic.IDs, loaderChan chan<- rest
|
||||
debug.Log("received job with nil tree pointer: %v (ID %v)", j.error, j.ID)
|
||||
err = errors.New("tree is nil and error is nil")
|
||||
} else {
|
||||
debug.Log("subtrees for tree %v: %v", j.ID, j.Tree.Subtrees())
|
||||
for _, id := range j.Tree.Subtrees() {
|
||||
subtrees := j.Tree.Subtrees()
|
||||
debug.Log("subtrees for tree %v: %v", j.ID, subtrees)
|
||||
for _, id := range subtrees {
|
||||
if id.IsNull() {
|
||||
// We do not need to raise this error here, it is
|
||||
// checked when the tree is checked. Just make sure
|
||||
|
Loading…
Reference in New Issue
Block a user