From d8461fb856a4d339941149142c0e50cfdbd5c280 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 12 Dec 2022 17:30:21 +0100 Subject: [PATCH] Fix not taking lock --- common/commonspace/diffservice/diffsyncer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/commonspace/diffservice/diffsyncer.go b/common/commonspace/diffservice/diffsyncer.go index 49947c0a..d5cb1c3a 100644 --- a/common/commonspace/diffservice/diffsyncer.go +++ b/common/commonspace/diffservice/diffsyncer.go @@ -129,7 +129,9 @@ func (d *diffSyncer) pingTreesInCache(ctx context.Context, trees []string) { // it may be already there (i.e. loaded) // and build func will not be called, thus we won't sync the tree // therefore we just do it manually + syncTree.Lock() syncTree.Ping() + syncTree.Unlock() } }