removed lock while loading a block that made block manager unnecessarily single-threaded

This commit is contained in:
Jarek Kowalski committed 2018-06-09 18:36:59 -07:00
1 parent e5e5577cfd
commit 19dcda1f47
1 file changed
+2
+2
View File
@@ -861,7 +861,9 @@ func (bm *Manager) getPackedBlockInternalLocked(ctx context.Context, blockID str
}
packFile := bi.PackFile
bm.mu.Unlock()
payload, err := bm.cache.getBlock(ctx, blockID, packFile, int64(bi.PackOffset), int64(bi.Length))
bm.mu.Lock()
if err != nil {
return nil, false, fmt.Errorf("unable to read storage block %v", err)
}