about summary refs log tree commit diff
path: root/src/store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-08-01T15·41+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-08-01T15·41+0000
commitc95b4ad2906ce4076f04e0969b7080c0589a8cea (patch)
treece3d6690834645117d2d6dfa714161fe97e09ca6 /src/store.hh
parentd99d04e6442dcc39a24cebac01af117ce00a5006 (diff)
* In normaliseFState(), wrap registration of the output paths and the
  normal form in a single transaction to ensure that if we crash,
  either everything is registered or nothing is.  This is for
  recoverability: unregistered paths in the store can be deleted
  arbitrarily, while registered paths can only be deleted by running
  the garbage collector.

Diffstat (limited to 'src/store.hh')
-rw-r--r--src/store.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/store.hh b/src/store.hh
index d1f1be6689ed..7f6b24569038 100644
--- a/src/store.hh
+++ b/src/store.hh
@@ -4,6 +4,7 @@
 #include <string>
 
 #include "hash.hh"
+#include "db.hh"
 
 using namespace std;
 
@@ -20,7 +21,8 @@ void copyPath(string src, string dst);
 void registerSubstitute(const FSId & srcId, const FSId & subId);
 
 /* Register a path keyed on its id. */
-void registerPath(const string & path, const FSId & id);
+void registerPath(const Transaction & txn,
+    const string & path, const FSId & id);
 
 /* Query the id of a path. */
 bool queryPathId(const string & path, FSId & id);