mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 08:42:30 +00:00
* Upgraded to Berkeley DB 4.1.25 and do not synchronously flush the
log on commit. This means that there is a small change that some transactions may be rolled back in case of a system crash, but this should not be a problem (it merely might cause some expression realisations to be rolled back), and it vastly improves performance. * Upgraded to ATerm 2.0.5 (which also includes Armijn's 64-bit patches).
This commit is contained in:
parent
181aa3dc41
commit
f7c7aad135
12
externals/Makefile.am
vendored
12
externals/Makefile.am
vendored
@ -1,11 +1,11 @@
|
|||||||
# Berkeley DB
|
# Berkeley DB
|
||||||
|
|
||||||
DB = db-4.0.14
|
DB = db-4.1.25
|
||||||
|
|
||||||
$(DB).tar.gz:
|
$(DB).tar.gz:
|
||||||
@echo "Nix requires Berkeley DB to build."
|
@echo "Nix requires Berkeley DB to build."
|
||||||
@echo "Please download version 4.0.14 from"
|
@echo "Please download version 4.1.25 from"
|
||||||
@echo " http://www.sleepycat.com/update/snapshot/db-4.0.14.tar.gz"
|
@echo " http://www.sleepycat.com/update/snapshot/db-4.1.25.tar.gz"
|
||||||
@echo "and place it in the externals/ directory."
|
@echo "and place it in the externals/ directory."
|
||||||
false
|
false
|
||||||
|
|
||||||
@ -28,12 +28,12 @@ build-db: have-db
|
|||||||
|
|
||||||
# CWI ATerm
|
# CWI ATerm
|
||||||
|
|
||||||
ATERM = aterm-2.0
|
ATERM = aterm-2.0.5
|
||||||
|
|
||||||
$(ATERM).tar.gz:
|
$(ATERM).tar.gz:
|
||||||
@echo "Nix requires the CWI ATerm library to build."
|
@echo "Nix requires the CWI ATerm library to build."
|
||||||
@echo "Please download version 2.0 from"
|
@echo "Please download version 2.0.5 from"
|
||||||
@echo " http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz"
|
@echo " http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz"
|
||||||
@echo "and place it in the externals/ directory."
|
@echo "and place it in the externals/ directory."
|
||||||
false
|
false
|
||||||
|
|
||||||
|
@ -160,6 +160,7 @@ void Database::open(const string & path)
|
|||||||
env->set_lg_bsize(32 * 1024); /* default */
|
env->set_lg_bsize(32 * 1024); /* default */
|
||||||
env->set_lg_max(256 * 1024); /* must be > 4 * lg_bsize */
|
env->set_lg_max(256 * 1024); /* must be > 4 * lg_bsize */
|
||||||
env->set_lk_detect(DB_LOCK_DEFAULT);
|
env->set_lk_detect(DB_LOCK_DEFAULT);
|
||||||
|
env->set_flags(DB_TXN_WRITE_NOSYNC, 1);
|
||||||
|
|
||||||
|
|
||||||
/* The following code provides automatic recovery of the
|
/* The following code provides automatic recovery of the
|
||||||
@ -252,11 +253,11 @@ void Database::close()
|
|||||||
{
|
{
|
||||||
debug(format("closing table %1%") % i->first);
|
debug(format("closing table %1%") % i->first);
|
||||||
Db * db = i->second;
|
Db * db = i->second;
|
||||||
db->close(0);
|
db->close(DB_NOSYNC);
|
||||||
delete db;
|
delete db;
|
||||||
}
|
}
|
||||||
|
|
||||||
env->txn_checkpoint(0, 0, 0);
|
// env->txn_checkpoint(0, 0, 0);
|
||||||
env->close(0);
|
env->close(0);
|
||||||
|
|
||||||
} catch (DbException e) { rethrow(e); }
|
} catch (DbException e) { rethrow(e); }
|
||||||
@ -285,8 +286,8 @@ TableId Database::openTable(const string & tableName)
|
|||||||
Db * db = new Db(env, 0);
|
Db * db = new Db(env, 0);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// !!! fixme when switching to BDB 4.1: use txn.
|
db->open(0, tableName.c_str(), 0,
|
||||||
db->open(tableName.c_str(), 0, DB_HASH, DB_CREATE, 0666);
|
DB_HASH, DB_CREATE | DB_AUTO_COMMIT, 0666);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
delete db;
|
delete db;
|
||||||
throw;
|
throw;
|
||||||
|
Loading…
Reference in New Issue
Block a user