Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Commit

Permalink
Merge pull request #99 from moio/master
Browse files Browse the repository at this point in the history
Recover Berkeley DB before opening it by default
  • Loading branch information
smokku committed Jul 6, 2015
2 parents 047135c + 99c3d17 commit 2b369d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/storage_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ st_ret_t st_init(st_driver_t drv) {
/* store the log context in case we panic */
env->app_private = drv->st->log;

if((err = env->open(env, path, DB_INIT_LOCK | DB_INIT_MPOOL | DB_INIT_LOG | DB_INIT_TXN | DB_CREATE, 0)) != 0) {
if((err = env->open(env, path, DB_INIT_LOCK | DB_INIT_MPOOL | DB_INIT_LOG | DB_INIT_TXN | DB_CREATE | DB_RECOVER, 0)) != 0) {
log_write(drv->st->log, LOG_ERR, "db: couldn't open environment: %s", db_strerror(err));
env->close(env, 0);
return st_FAILED;
Expand Down

0 comments on commit 2b369d0

Please sign in to comment.