diff --git a/core/blockstm/mvhashmap.go b/core/blockstm/mvhashmap.go index 38b075b0d8..003de91e70 100644 --- a/core/blockstm/mvhashmap.go +++ b/core/blockstm/mvhashmap.go @@ -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 }