mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:04:12 +08:00
mdbx: relax DBI-sequences for concurrent open DBI-handles for present tables.
Change-Id: I7f07d2e716074bd9c2847aeb062e366f46cca214
This commit is contained in:
parent
eda424ff71
commit
f626acb398
@ -12100,19 +12100,19 @@ int mdbx_dbi_open_ex(MDBX_txn *txn, const char *table_name, unsigned user_flags,
|
||||
bailout:
|
||||
mdbx_free(namedup);
|
||||
} else {
|
||||
txn->mt_dbiseqs[slot] = (env->me_dbiseqs[slot] += 1);
|
||||
txn->mt_dbflags[slot] = (uint8_t)dbflag;
|
||||
txn->mt_dbxs[slot].md_name.iov_base = namedup;
|
||||
mdbx_compiler_barrier();
|
||||
txn->mt_dbxs[slot].md_name.iov_len = len;
|
||||
if (slot == txn->mt_numdbs)
|
||||
txn->mt_numdbs++;
|
||||
txn->mt_numdbs += (slot == txn->mt_numdbs);
|
||||
if ((dbflag & DB_CREAT) == 0) {
|
||||
env->me_dbflags[slot] = txn->mt_dbs[slot].md_flags | MDBX_VALID;
|
||||
mdbx_compiler_barrier();
|
||||
if (env->me_numdbs <= slot)
|
||||
env->me_numdbs = slot + 1;
|
||||
} else {
|
||||
env->me_dbiseqs[slot] += 1;
|
||||
}
|
||||
txn->mt_dbiseqs[slot] = env->me_dbiseqs[slot];
|
||||
*dbi = slot;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user