aboutsummaryrefslogtreecommitdiff
path: root/src/db.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-05-19 01:25:06 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-05-19 01:25:06 -0400
commit394b9298faec503f3780645ed17fa00cce6da2dd (patch)
treec1b5cbe180e3cafa2ab4658c33001bc2292f50f1 /src/db.h
parentd6615a54c6146728717ad0f8819f32f002613f5c (diff)
downloadbitcoin-394b9298faec503f3780645ed17fa00cce6da2dd.tar.xz
Default to DB_TXN_WRITE_NOSYNC for all transactional operations
* This is safer than DB_TXN_NOSYNC, and does not appear to impact performance. * Applying this to the dbenv is necessary to avoid many fdatasync(2) calls on db 5.x * We carefully and thoroughly flush databases upon shutdown and other important events already.
Diffstat (limited to 'src/db.h')
-rw-r--r--src/db.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.h b/src/db.h
index 9cec267e98..0ff06e40a8 100644
--- a/src/db.h
+++ b/src/db.h
@@ -216,7 +216,7 @@ public:
if (!pdb)
return false;
DbTxn* ptxn = NULL;
- int ret = dbenv.txn_begin(GetTxn(), &ptxn, DB_TXN_NOSYNC);
+ int ret = dbenv.txn_begin(GetTxn(), &ptxn, DB_TXN_WRITE_NOSYNC);
if (!ptxn || ret != 0)
return false;
vTxn.push_back(ptxn);