diff --git a/mdbx.h b/mdbx.h index ddf1a040..e3ee6cef 100644 --- a/mdbx.h +++ b/mdbx.h @@ -1,4 +1,4 @@ -/* LICENSE AND COPYRUSTING ***************************************************** +/* LICENSE AND COPYRUSTING ***************************************************** * * Copyright 2015-2018 Leonid Yuriev * 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, diff --git a/src/mdbx.c b/src/mdbx.c index 1f9357d2..6e59a42b 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -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;