about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-11-23T16·34+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-11-23T16·34+0000
commitc364d5d1e36a9f790b0d610aae1d30d8732b58ce (patch)
tree648befc4bb679b692d5d39c83a54a555cd8c8835 /src/libstore/local-store.hh
parent4f7e5f5810380ba4bcdd3c32c37dafb75d8e2f8d (diff)
* Made the garbage collector a lot faster. It no longer computes the
  complete set of live and dead paths before starting the actual
  deletion, but determines liveness on demand.  I.e. for any path in
  the store, it first tries to delete all the referrers, and then the
  path itself.  This means that the collector can start deleting paths
  almost immediately.

Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 242239898b98..e851d0509e4d 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -174,12 +174,13 @@ private:
     
     void upgradeStore12();
 
-    void gcPath(const GCOptions & options, GCResults & results,
-        const Path & path);
-
-    void gcPathRecursive(const GCOptions & options,
-        GCResults & results, PathSet & done, const Path & path);
+    struct GCState;
 
+    bool tryToDelete(GCState & state, const Path & path);
+    
+    bool isActiveTempFile(const GCState & state,
+        const Path & path, const string & suffix);
+        
     void startSubstituter(const Path & substituter,
         RunningSubstituter & runningSubstituter);
 };