Commit graph

11 commits

Author SHA1 Message Date
Eelco Dolstra 5c84e4950d Ensure we're writing to stderr in the builder
http://hydra.nixos.org/build/17862041
2015-06-03 18:05:33 +02:00
Eelco Dolstra 554eaf5e8c Disable vacuuming the DB after garbage collection
Especially in WAL mode on a highly loaded machine, this is not a good
idea because it results in a WAL file of approximately the same size
ad the database, which apparently cannot be deleted while anybody is
accessing it.
2015-05-11 17:42:18 +02:00
Eelco Dolstra f160a30d56 Clean up temp roots in a more C++ way 2015-05-11 17:40:44 +02:00
Eelco Dolstra 86b9e6d457 nix-store --gc: Don't warn about missing manifests directory 2015-05-11 17:39:01 +02:00
Eelco Dolstra c2b65dd197 Remove some duplicate code 2015-05-11 17:36:05 +02:00
Eelco Dolstra aa98ba5067 Use regular file GC roots if possible
This makes hydra-eval-jobs create roots as regular files. See
1c208f2b7ef8ffb5e6d435d703dad83223a67bd6.
2015-05-11 17:23:33 +02:00
Eelco Dolstra 666c9b7108 findRoots(): Prevent a call to lstat()
This means that getting the roots from /nix/var/nix/.../hydra-roots
doesn't need any I/O other than reading the directory.
2015-05-11 17:15:12 +02:00
Eelco Dolstra 82d463d9ca Make readDirectory() return inode / file type 2015-05-11 17:14:51 +02:00
Eelco Dolstra a98fa2d9e2 Allow regular files as GC roots
If a root is a regular file, then its name must denote a store
path. For instance, the existence of the file

  /nix/var/nix/gcroots/per-user/eelco/hydra-roots/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7

would cause

  /nix/store/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7

to be a root.

This is useful because it involves less I/O (no need for a readlink()
call) and takes up less disk space (the symlink target typically takes
up a full disk block, while directory entries are packed more
efficiently). This is particularly important for hydra.nixos.org,
which has hundreds of thousands of roots, and where reading the roots
can take 25 minutes.
2015-05-11 17:13:24 +02:00
Ludovic Courtès 0a751260ae nix: Adjust code for Guix.
* nix/libstore/gc.cc (addAdditionalRoots): Refer to 'list-runtime-roots'
  instead of 'find-runtime-roots.pl'.
* nix/libutil/hash.cc, nix/libutil/hash.hh: Change 'union Ctx' to
  'struct Ctx', like 'nix/sync-with-upstream' did.
* nix/AUTHORS: New file.
* nix/COPYING: New file, from upstream Nix.
* nix/libutil/md32_common.h, nix/libutil/md5.c, nix/libutil/md5.h,
  nix/libutil/sha1.c, nix/libutil/sha1.h, nix/libutil/sha256.c,
  nix/libutil/sha256.h: Remove.
2014-12-17 22:57:33 +01:00
Ludovic Courtès d4e18b05e0 Keep only libstore, nix-daemon, and related stuff. 2014-12-17 22:57:04 +01:00
Renamed from src/libstore/gc.cc (Browse further)