forked from TrueCloudLab/frostfs-node
Evgenii Stratonikov
e0309e398c
LRU `Peek`/`Contains` take LRU mutex _inside_ of a `View` transaction.
`View` transaction itself takes `mmapLock` [1], which is lifted after tx
finishes (in `tx.Commit()` -> `tx.close()` -> `tx.db.removeTx`)
When we evict items from LRU cache mutex order is different:
first we take LRU mutex and then execute `Batch` which _does_ take
`mmapLock` in case we need to remap. Thus the deadlock.
[1]
|
||
---|---|---|
.. | ||
delete.go | ||
doc.go | ||
flush.go | ||
flush_test.go | ||
generic_test.go | ||
get.go | ||
init.go | ||
iterate.go | ||
mode.go | ||
options.go | ||
put.go | ||
state.go | ||
storage.go | ||
util.go | ||
writecache.go |