mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-01 09:33:46 +00:00
hole the rlock while reading WriteCell
This commit is contained in:
parent
aa00c8f96c
commit
d0c7045cce
1 changed files with 3 additions and 1 deletions
|
|
@ -222,8 +222,8 @@ func (mv *MVHashMap) Read(k Key, txIdx int) (res MVReadResult) {
|
|||
}
|
||||
|
||||
cells.rw.RLock()
|
||||
|
||||
fk, fv := cells.tm.Floor(txIdx - 1)
|
||||
cells.rw.RUnlock()
|
||||
|
||||
if fk != nil && fv != nil {
|
||||
c := fv.(*WriteCell)
|
||||
|
|
@ -242,6 +242,8 @@ func (mv *MVHashMap) Read(k Key, txIdx int) (res MVReadResult) {
|
|||
}
|
||||
}
|
||||
|
||||
cells.rw.RUnlock()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue