mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-05 00:42:20 +08:00
mdbx: add space
argument for oom-callback.
Change-Id: I27634e02046df375fffae66de3124e8cd90cc61c
This commit is contained in:
@@ -77,14 +77,15 @@ const char *keygencase2str(const keygen_case keycase) {
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
int testcase::oom_callback(MDBX_env *env, mdbx_pid_t pid, mdbx_tid_t tid,
|
||||
uint64_t txn, unsigned gap, int retry) {
|
||||
uint64_t txn, unsigned gap, size_t space,
|
||||
int retry) {
|
||||
|
||||
testcase *self = (testcase *)mdbx_env_get_userctx(env);
|
||||
|
||||
if (retry == 0)
|
||||
log_notice("oom_callback: waitfor pid %u, thread %" PRIuPTR
|
||||
", txn #%" PRIu64 ", gap %d",
|
||||
pid, (size_t)tid, txn, gap);
|
||||
", txn #%" PRIu64 ", gap %d, scape %zu",
|
||||
pid, (size_t)tid, txn, gap, space);
|
||||
|
||||
if (self->should_continue(true)) {
|
||||
osal_yield();
|
||||
|
@@ -99,7 +99,7 @@ protected:
|
||||
} last;
|
||||
|
||||
static int oom_callback(MDBX_env *env, mdbx_pid_t pid, mdbx_tid_t tid,
|
||||
uint64_t txn, unsigned gap, int retry);
|
||||
uint64_t txn, unsigned gap, size_t space, int retry);
|
||||
|
||||
void db_prepare();
|
||||
void db_open();
|
||||
|
Reference in New Issue
Block a user