Commit 384656b6 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Hold checkpoint_safe lock when setting callback, clear callback at end of test.

git-svn-id: file:///svn/toku/tokudb@11320 c7de825b-a66e-492c-adef-691d508d4ae1
parent a339f7af
...@@ -327,7 +327,8 @@ test_main (int argc, const char *argv[]) { ...@@ -327,7 +327,8 @@ test_main (int argc, const char *argv[]) {
} }
db_env_set_checkpoint_callback(checkpoint_callback, (void*) test_dictionary); db_env_set_checkpoint_callback(checkpoint_callback, (void*) test_dictionary);
runtests(0,4,1); runtests(0,4096,1);
db_env_set_checkpoint_callback(NULL, NULL);
return 0; return 0;
} }
......
...@@ -3818,6 +3818,8 @@ void setup_dlmalloc (void) { ...@@ -3818,6 +3818,8 @@ void setup_dlmalloc (void) {
// For test purposes only. // For test purposes only.
// With this interface, all checkpoint users get the same callback and the same extra. // With this interface, all checkpoint users get the same callback and the same extra.
void db_env_set_checkpoint_callback (void (*callback_f)(void*), void* extra) { void db_env_set_checkpoint_callback (void (*callback_f)(void*), void* extra) {
toku_checkpoint_safe_client_lock();
checkpoint_callback_f = callback_f; checkpoint_callback_f = callback_f;
checkpoint_callback_extra = extra; checkpoint_callback_extra = extra;
toku_checkpoint_safe_client_unlock();
} }
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