Commit 52819f0e authored by Yoni Fogel's avatar Yoni Fogel

Fix regression where we would not pass some memarenas to a parent transactions. Fixes #1577

git-svn-id: file:///svn/toku/tokudb@10456 c7de825b-a66e-492c-adef-691d508d4ae1
parent 19665ad1
......@@ -473,7 +473,7 @@ int toku_logger_commit (TOKUTXN txn, int nosync, void(*yield)(void*yieldv), void
}
txn->newest_logentry = txn->oldest_logentry = 0;
// Put all the memarena data into the parent.
if (memarena_size_in_use(txn->rollentry_arena) > 0) {
if (memarena_total_size_in_use(txn->rollentry_arena) > 0) {
// If there are no bytes to move, then just leave things alone, and let the memory be reclaimed on txn is closed.
memarena_move_buffers(txn->parent->rollentry_arena, txn->rollentry_arena);
}
......
......@@ -143,7 +143,7 @@ memarena_total_memory_size (MEMARENA m)
}
size_t
memarena_size_in_use (MEMARENA m)
memarena_total_size_in_use (MEMARENA m)
{
return m->buf_used;
return m->size_of_other_bufs + m->buf_used;
}
......@@ -37,6 +37,6 @@ void memarena_move_buffers(MEMARENA dest, MEMARENA source);
size_t memarena_total_memory_size (MEMARENA);
// Effect: Calculate the amount of memory used by a memory arena.
size_t memarena_size_in_use (MEMARENA);
size_t memarena_total_size_in_use (MEMARENA);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment