mdbx: minors.

Change-Id: Id1d8ed5bf6ce253dc73b2e69e8701bffa83f7e12
This commit is contained in:
Leo Yuriev 2016-03-11 20:35:53 +03:00
parent ded1ada9eb
commit eb429da210
2 changed files with 11 additions and 12 deletions

2
lmdb.h
View File

@ -1658,7 +1658,7 @@ int mdb_reader_check(MDB_env *env, int *dead);
* @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.
*/
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,
* called in case of MDB_MAP_FULL error.

5
mdb.c
View File

@ -108,7 +108,7 @@
# define MDB_DBG_EXTRA 0
# define MDB_DBG_AUDIT 0
# define MDB_DBG_EDGE 0
#endif
#endif /* ! MDBX_MODE_ENABLED */
#if (BYTE_ORDER == LITTLE_ENDIAN) == (BYTE_ORDER == BIG_ENDIAN)
# error "Unknown or unsupported endianness (BYTE_ORDER)"
@ -2862,9 +2862,8 @@ mdb_txn_renew0(MDB_txn *txn, unsigned flags)
#ifdef __SANITIZE_THREAD__
pthread_mutex_lock(&tsan_mutex);
#endif
if (i == nr) {
if (i == nr)
env->me_txns->mti_numreaders = ++nr;
}
if (env->me_close_readers < nr)
env->me_close_readers = nr;
r->mr_pid = pid;