Commit cf5aafaa authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Addresses #1792 refs[t:1792] Improve checkpoint footprint.

git-svn-id: file:///svn/toku/tokudb@14448 c7de825b-a66e-492c-adef-691d508d4ae1
parent 00415bd9
......@@ -183,28 +183,30 @@ toku_checkpoint(CACHETABLE ct, TOKULOGGER logger, char **error_string,
void (*callback2_f)(void*), void * extra2) {
int r;
checkpoint_footprint = 0;
checkpoint_footprint = 1;
assert(initialized);
multi_operation_checkpoint_lock();
checkpoint_footprint = 2;
checkpoint_safe_checkpoint_lock();
checkpoint_footprint = 3;
ydb_lock();
checkpoint_footprint = 1;
checkpoint_footprint = 4;
r = toku_cachetable_begin_checkpoint(ct, logger);
multi_operation_checkpoint_unlock();
ydb_unlock();
checkpoint_footprint = 2;
checkpoint_footprint = 5;
if (r==0) {
if (callback_f)
callback_f(extra); // callback is called with checkpoint_safe_lock still held
r = toku_cachetable_end_checkpoint(ct, logger, error_string, callback2_f, extra2);
}
checkpoint_footprint = 3;
checkpoint_footprint = 6;
checkpoint_safe_checkpoint_unlock();
checkpoint_footprint = 4;
checkpoint_footprint = 0;
return r;
}
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