Commit 2e80dfa9 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #6040 add checkpoint_period to db-update.c

git-svn-id: file:///svn/toku/tokudb@53389 c7de825b-a66e-492c-adef-691d508d4ae1
parent 68654d86
......@@ -235,15 +235,6 @@ int main(int argc, char *argv[]) {
r = db_env_create(&db_env, 0); assert(r == 0);
#if defined(TOKUDB)
db_env->set_update(db_env, my_update_callback);
#endif
#if defined(TOKUDB)
if (checkpoint_period) {
r = db_env->checkpointing_set_period(db_env, checkpoint_period);
assert(r == 0);
u_int32_t period;
r = db_env->checkpointing_get_period(db_env, &period);
assert(r == 0 && period == checkpoint_period);
}
#endif
if (cachesize) {
if (verbose) printf("cachesize %llu\n", (unsigned long long)cachesize);
......@@ -255,6 +246,15 @@ int main(int argc, char *argv[]) {
db_env->set_errcall(db_env, db_error);
if (verbose) printf("env %s\n", db_env_dir);
r = db_env->open(db_env, db_env_dir, db_env_open_flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);
#if defined(TOKUDB)
if (checkpoint_period) {
r = db_env->checkpointing_set_period(db_env, checkpoint_period);
assert(r == 0);
u_int32_t period;
r = db_env->checkpointing_get_period(db_env, &period);
assert(r == 0 && period == checkpoint_period);
}
#endif
// create the db
DB *db = NULL;
......
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