* Disable calls to fsync() since Berkeley DB's DB_TXN_WRITE_NOSYNC

flag doesn't seem to work as advertised.
This commit is contained in:
Eelco Dolstra 2004-06-21 07:36:01 +00:00
parent 112ee89501
commit 15c60ca1b6

View file

@ -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