mdbx: add space argument for oom-callback.

Change-Id: I27634e02046df375fffae66de3124e8cd90cc61c
This commit is contained in:
Leonid Yuriev
2019-09-28 19:03:02 +03:00
parent 86496e4480
commit 87f8c01ac4
4 changed files with 103 additions and 39 deletions

View File

@@ -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();

View File

@@ -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();