Merge pull request #7939 from filecoin-project/asr/migration-autobatch
fix: blockstore: Add missing locks to autobatch::Get()
This commit is contained in:
commit
ae12c70afe
@ -162,6 +162,8 @@ func (bs *AutobatchBlockstore) Get(ctx context.Context, c cid.Cid) (block.Block,
|
||||
return blk, err
|
||||
}
|
||||
|
||||
bs.stateLock.Lock()
|
||||
defer bs.stateLock.Unlock()
|
||||
v, ok := bs.flushingBatch.blockMap[c]
|
||||
if ok {
|
||||
return v, nil
|
||||
|
Loading…
Reference in New Issue
Block a user