mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-31 14:18:22 +08:00
mdbx: minors.
Change-Id: Id1d8ed5bf6ce253dc73b2e69e8701bffa83f7e12
This commit is contained in:
parent
ded1ada9eb
commit
eb429da210
2
lmdb.h
2
lmdb.h
@ -1658,7 +1658,7 @@ int mdb_reader_check(MDB_env *env, int *dead);
|
|||||||
* @param[out] percent Percentage of page allocation in the database.
|
* @param[out] percent Percentage of page allocation in the database.
|
||||||
* @return Number of transactions committed after the given was started for read, or -1 on failure.
|
* @return Number of transactions committed after the given was started for read, or -1 on failure.
|
||||||
*/
|
*/
|
||||||
int mdbx_txn_straggler(MDB_txn *txnm, int *percent);
|
int mdbx_txn_straggler(MDB_txn *txn, int *percent);
|
||||||
|
|
||||||
/** @brief A callback function for killing a laggard readers,
|
/** @brief A callback function for killing a laggard readers,
|
||||||
* called in case of MDB_MAP_FULL error.
|
* called in case of MDB_MAP_FULL error.
|
||||||
|
5
mdb.c
5
mdb.c
@ -108,7 +108,7 @@
|
|||||||
# define MDB_DBG_EXTRA 0
|
# define MDB_DBG_EXTRA 0
|
||||||
# define MDB_DBG_AUDIT 0
|
# define MDB_DBG_AUDIT 0
|
||||||
# define MDB_DBG_EDGE 0
|
# define MDB_DBG_EDGE 0
|
||||||
#endif
|
#endif /* ! MDBX_MODE_ENABLED */
|
||||||
|
|
||||||
#if (BYTE_ORDER == LITTLE_ENDIAN) == (BYTE_ORDER == BIG_ENDIAN)
|
#if (BYTE_ORDER == LITTLE_ENDIAN) == (BYTE_ORDER == BIG_ENDIAN)
|
||||||
# error "Unknown or unsupported endianness (BYTE_ORDER)"
|
# error "Unknown or unsupported endianness (BYTE_ORDER)"
|
||||||
@ -2862,9 +2862,8 @@ mdb_txn_renew0(MDB_txn *txn, unsigned flags)
|
|||||||
#ifdef __SANITIZE_THREAD__
|
#ifdef __SANITIZE_THREAD__
|
||||||
pthread_mutex_lock(&tsan_mutex);
|
pthread_mutex_lock(&tsan_mutex);
|
||||||
#endif
|
#endif
|
||||||
if (i == nr) {
|
if (i == nr)
|
||||||
env->me_txns->mti_numreaders = ++nr;
|
env->me_txns->mti_numreaders = ++nr;
|
||||||
}
|
|
||||||
if (env->me_close_readers < nr)
|
if (env->me_close_readers < nr)
|
||||||
env->me_close_readers = nr;
|
env->me_close_readers = nr;
|
||||||
r->mr_pid = pid;
|
r->mr_pid = pid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user