mirror of
https://github.com/isar/libmdbx.git
synced 2025-09-16 03:32:19 +08:00
mdbx: add locking while open/close/drop dbi-handles (avoid dbi-related races).
This avoid races and collisions between threads when opening, closing and deleting DBI-handles. unfortunately, this does not resolve collision in the case an one thread closing the DBI-handle while the another thread performs transaction. Change-Id: I48c3ffb11a8f83739fae1712db3476645f573e09
This commit is contained in:
@@ -603,6 +603,7 @@ struct MDBX_env {
|
||||
unsigned me_maxreaders; /* size of the reader table */
|
||||
/* Max MDBX_lockinfo.mti_numreaders of interest to mdbx_env_close() */
|
||||
unsigned me_close_readers;
|
||||
mdbx_fastmutex_t me_dbi_lock;
|
||||
MDBX_dbi me_numdbs; /* number of DBs opened */
|
||||
MDBX_dbi me_maxdbs; /* size of the DB table */
|
||||
mdbx_pid_t me_pid; /* process ID of this env */
|
||||
|
Reference in New Issue
Block a user