diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/db.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/db.cc b/src/libstore/db.cc index 8c0678d0e88b..e792a371b803 100644 --- a/src/libstore/db.cc +++ b/src/libstore/db.cc @@ -146,6 +146,12 @@ void openEnv(DbEnv * env, const string & path, u_int32_t flags) } +static int my_fsync(int fd) +{ + return 0; +} + + void Database::open(const string & path) { if (env) throw Error(format("environment already open")); @@ -164,6 +170,8 @@ void Database::open(const string & path) env->set_lk_detect(DB_LOCK_DEFAULT); env->set_flags(DB_TXN_WRITE_NOSYNC | DB_LOG_AUTOREMOVE, 1); + db_env_set_func_fsync(my_fsync); + /* The following code provides automatic recovery of the database environment. Recovery is necessary when a process |