mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:34:13 +08:00
mdbx: minor fix/refine mdbx_txn_straggler() for r/w-txn.
Change-Id: Id44a1db414de457d74a3e1d9d5c96064a7278080
This commit is contained in:
parent
4708e0cf79
commit
5fd05db6ea
4
mdbx.h
4
mdbx.h
@ -1,4 +1,4 @@
|
||||
/* LICENSE AND COPYRUSTING *****************************************************
|
||||
/* LICENSE AND COPYRUSTING *****************************************************
|
||||
*
|
||||
* Copyright 2015-2018 Leonid Yuriev <leo@yuriev.ru>
|
||||
* and other libmdbx authors: please see AUTHORS file.
|
||||
@ -1601,7 +1601,7 @@ LIBMDBX_API int mdbx_env_set_syncbytes(MDBX_env *env, size_t bytes);
|
||||
* [out] percent Percentage of page allocation in the database.
|
||||
*
|
||||
* Returns Number of transactions committed after the given was started for
|
||||
* read, or -1 on failure. */
|
||||
* read, or negative value on failure. */
|
||||
LIBMDBX_API int mdbx_txn_straggler(MDBX_txn *txn, int *percent);
|
||||
|
||||
/* A callback function for killing a laggard readers,
|
||||
|
@ -12810,7 +12810,7 @@ int mdbx_txn_straggler(MDBX_txn *txn, int *percent)
|
||||
*percent =
|
||||
(int)((txn->mt_next_pgno * UINT64_C(100) + txn->mt_end_pgno / 2) /
|
||||
txn->mt_end_pgno);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
txnid_t recent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user