-
James Ravn authored
Even nested read-only transactions can cause deadlocks. This is due to golang's RWMutex behaviour. It doesn't allow readers to acquire a lock if a write lock is pending. It's possible for a child read-only transaction to block trying to acquire `mmaplock.RLock`, while a writer is trying to acquire `mmaplock.Lock`. As a result, the parent transaction never releases its read lock on `mmaplock`, and the application deadlocks. This wasn't clear to me from the provided docs, which just mentions read/write and read transactions being nested.