mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:44:14 +08:00
mdbx: don't close/lost DBI-handles on ro-txn renew/reset.
More for d0383e5aeeb29fc07b568a0d4b5287d539be5d0d Also this is related to: - https://github.com/ReOpen/ReOpenLDAP/issues/119 (its6794 regression test may fail) - https://github.com/ReOpen/ReOpenLDAP/issues/92 (rare test060-mt-hot failures)
This commit is contained in:
parent
41576e553c
commit
1708025651
7
mdb.c
7
mdb.c
@ -3244,7 +3244,12 @@ mdb_txn_reset(MDB_txn *txn)
|
|||||||
if (unlikely(!(txn->mt_flags & MDB_TXN_RDONLY)))
|
if (unlikely(!(txn->mt_flags & MDB_TXN_RDONLY)))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
#if MDBX_MODE_ENABLED
|
||||||
|
/* LY: don't close DBI-handles in MDBX mode */
|
||||||
|
return mdb_txn_end(txn, MDB_END_RESET|MDB_END_UPDATE);
|
||||||
|
#else
|
||||||
return mdb_txn_end(txn, MDB_END_RESET);
|
return mdb_txn_end(txn, MDB_END_RESET);
|
||||||
|
#endif /* MDBX_MODE_ENABLED */
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -3259,7 +3264,7 @@ mdb_txn_abort(MDB_txn *txn)
|
|||||||
#if MDBX_MODE_ENABLED
|
#if MDBX_MODE_ENABLED
|
||||||
if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY))
|
if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY))
|
||||||
/* LY: don't close DBI-handles in MDBX mode */
|
/* LY: don't close DBI-handles in MDBX mode */
|
||||||
return mdb_txn_end(txn, MDB_END_UPDATE|MDB_END_SLOT|MDB_END_FREE);
|
return mdb_txn_end(txn, MDB_END_ABORT|MDB_END_UPDATE|MDB_END_SLOT|MDB_END_FREE);
|
||||||
#endif /* MDBX_MODE_ENABLED */
|
#endif /* MDBX_MODE_ENABLED */
|
||||||
|
|
||||||
if (txn->mt_child)
|
if (txn->mt_child)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user