Skip to content

DB Write access needs to be protected #1

@RussellHaley

Description

@RussellHaley

Issue
lmdb allows only one writer per environment.
http://www.lmdb.tech/doc/starting.html
"There can be multiple simultaneously active read-only transactions but only one that can write. Once a single read-write transaction is opened, all further attempts to begin one will block until the first one is committed or aborted. This has no effect on read-only transactions, however, and they may continue to be opened at any time."

I am unsure of how lua's single threading affects this limitation, but can conceive that yielding will be problematic. Should the system support multithreading with one environment?

Solution
There needs to be a new write transaction manager created that mutexes the write access and stores it in the lmdb environment wrapper (?).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions