fixed block manager lock which triggered asserts during parallel read/write

This commit is contained in:
Jarek Kowalski committed 2018-06-23 12:30:19 -07:00
1 parent 173c5613c1
commit c7d898a674
1 file changed
+2 -2
+2 -2
View File
@@ -895,9 +895,9 @@ func (bm *Manager) getPackedBlockInternalLocked(ctx context.Context, blockID str
}
packFile := bi.PackFile
bm.mu.Unlock()
bm.unlock()
payload, err := bm.blockCache.getContentBlock(ctx, blockID, packFile, int64(bi.PackOffset), int64(bi.Length))
bm.mu.Lock()
bm.lock()
if err != nil {
return nil, false, fmt.Errorf("unable to read storage block %v", err)
}