From 06d3d7355d1b0ec05e61d2e7fe67f8d7153c1ff9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Jul 2003 16:05:35 +0000 Subject: * Enclose most operations that update the database in transactions. * Open all database tables (Db objects) at initialisation time, not every time they are used. This is necessary because tables have to outlive all transactions that refer to them. --- src/normalise.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/normalise.cc') diff --git a/src/normalise.cc b/src/normalise.cc index 5a8cb9a0d0ff..e8fc6fc55078 100644 --- a/src/normalise.cc +++ b/src/normalise.cc @@ -9,7 +9,9 @@ void registerSuccessor(const FSId & id1, const FSId & id2) { - nixDB.setString(noTxn, dbSuccessors, id1, id2); + Transaction txn(nixDB); + nixDB.setString(txn, dbSuccessors, id1, id2); + txn.commit(); } -- cgit 1.4.1