about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
AgeCommit message (Collapse)AuthorFilesLines
2010-08-31 `nix-store --verify' improvements:Eelco Dolstra1-16/+53
* If a path has disappeared, check its referrers first, and don't try to invalidate paths that have valid referrers. Otherwise we get a foreign key constraint violation. * Read the whole Nix store directory instead of statting each valid path, which is slower. * Acquire the global GC lock.
2010-08-24 * Don't complain if the stored hash of a path is zero (unknown).Eelco Dolstra1-2/+3
2010-08-04 * Use SQLite 3.7.0's write-ahead logging (WAL mode). This is a lotEelco Dolstra1-2/+12
faster than the old mode when fsyncs are enabled, because it only performs an fsync() when doing a checkpoint, rather than at every commit. Some timings for doing a "nix-instantiate /etc/nixos/nixos -A system" after modifying the stdenv setup script: 42.5s - SQLite 3.6.23 with truncate mode and fsync 3.4s - SQLite 3.6.23 with truncate mode and no fsync 32.1s - SQLite 3.7.0 with truncate mode and fsync 16.8s - SQLite 3.7.0 with WAL mode and fsync, auto-checkpoint every 1000 pages 8.3s - SQLite 3.7.0 with WAL mode and fsync, auto-checkpoint every 8192 pages 1.7s - SQLite 3.7.0 with WAL mode and no fsync The default is now to use WAL mode with fsyncs. Because WAL doesn't work on remote filesystems such as NFS (as it uses shared memory), truncate mode can be re-enabled by setting the "use-sqlite-wal" option to false.
2010-06-21 * Okay, putting a lock on the temporary directory used by importPath()Eelco Dolstra1-6/+18
doesn't work because the garbage collector doesn't actually look at locks. So r22253 was stupid. Use addTempRoot() instead. Also, locking the temporary directory in exportPath() was silly because it isn't even in the store.
2010-06-21 * Sync with the trunk.Eelco Dolstra1-0/+4
2010-06-14 * In importPath() and exportPath(), lock the temporary directory toEelco Dolstra1-0/+4
prevent it from being deleted by the garbage collector.
2010-06-08 * Replacing ValidPath rows doesn't work because it causes a constraintEelco Dolstra1-2/+5
violation of the Refs table. So don't do that.
2010-05-12 * Sync with the trunk.Eelco Dolstra1-4/+1
2010-04-26 * Added a command `nix-store --clear-failed-paths <PATHS>' to clearEelco Dolstra1-0/+17
the "failed" status of the given store paths. The special value `*' clears all failed paths.
2010-04-26 * Add an command `nix-store --query-failed-paths' to list the cachedEelco Dolstra1-0/+21
failed paths (when using the `build-cache-failure' option).
2010-04-19 * Don't use the ATerm library for parsing/printing .drv files.Eelco Dolstra1-2/+0
2010-03-10 * Remove a debug statement.Eelco Dolstra1-1/+0
2010-03-09 * In `nix-store --export', abort if the contents of a path hasEelco Dolstra1-6/+17
changed. This prevents corrupt paths from spreading to other machines. Note that checking the hash is cheap because we're hashing anyway (because of the --sign feature).
2010-03-08 * Increase the sqlite timeout.Eelco Dolstra1-1/+1
2010-03-02 * checkInterrupt() shouldn't be called from a destructor.Eelco Dolstra1-1/+1
2010-02-24 * Support read-only access to the database.Eelco Dolstra1-1/+5
2010-02-24 * Refactor the upgrade / database initialisation logic a bit.Eelco Dolstra1-56/+61
2010-02-24 * Don't use fdatasync since it doesn't work on Snow Leopard.Eelco Dolstra1-2/+2
* Don't refer to config.h in util.hh, because config.h is not installed (http://hydra.nixos.org/build/303053).
2010-02-24 * A function to query just the database id of a valid path.Eelco Dolstra1-16/+20
2010-02-24 * Use `truncate' journal mode, which should be a bit faster.Eelco Dolstra1-0/+4
2010-02-24 * Disable fsync() in SQLite if the fsync-metadata option is set toEelco Dolstra1-5/+7
false. * Change the default for `fsync-metadata' to true. * Disable `fsync-metadata' in `make check'.
2010-02-24 * Do registerValidPaths() in one transaction, which is much faster.Eelco Dolstra1-29/+9
E.g. it cuts the runtime of the referrers test from 50s to 23s.
2010-02-24 * Use normal (rather than full) synchronous mode, which I gather fromEelco Dolstra1-0/+4
the description at http://www.sqlite.org/atomiccommit.html should be safe enough.
2010-02-22 (no commit message)Eelco Dolstra1-4/+0
2010-02-22 * The database needs a trigger to get rid of self-references toEelco Dolstra1-2/+10
prevent a foreign key constraint violation on the Refs table when deleting a path.
2010-02-22 * Get derivation outputs from the database instead of the .drv file,Eelco Dolstra1-0/+24
which requires more I/O.
2010-02-22 * Revert r19650 (implement gc-keep-outputs by looking for derivationsEelco Dolstra1-0/+24
with the same name as the output) and instead use the DerivationOutputs table in the database, which is the correct way to to do things.
2010-02-22 * Put the derivation outputs in the database. This is useful for theEelco Dolstra1-2/+24
garbage collector.
2010-02-19 * Foreign key support in SQLite is not a persistent setting, so enableEelco Dolstra1-2/+19
it at startup. * Implement negative caching. Now `make check' passes.
2010-02-19 * Implement more stuff.Eelco Dolstra1-52/+45
2010-02-19 * Implement registerValidPath().Eelco Dolstra1-111/+90
2010-02-18 * Implemented queryValidPaths() and verifyStore().Eelco Dolstra1-117/+34
2010-02-18 * Implemented queryReferrers().Eelco Dolstra1-30/+18
2010-02-18 * Implement queryPathInfo().Eelco Dolstra1-49/+46
2010-02-18 * Implement isValidPath().Eelco Dolstra1-149/+95
2010-02-18 * Automatically abort transactions if they go out of scope withoutEelco Dolstra1-6/+37
committing.
2010-02-18 * Some wrapper objects to ensure that SQLite objects are properlyEelco Dolstra1-45/+73
destroyed.
2010-02-18 * Add the deriver to the ValidPaths table. In principle we could nowEelco Dolstra1-12/+19
store all the derivers of a path efficiently. But that opens a big can of worms with respect to garbage collector semantics.
2010-02-18 * Assign an integer id to every row in the ValidPaths table in orderEelco Dolstra1-2/+16
to make the Refs table more space-efficient. For instance, this reduces the size of the database on my laptop from 93 MiB to 18 MiB. (It was 72 MiB with the old schema on an ext3 disk with a 1 KiB block size.)
2010-02-18 * Convert the Nix database to SQLite.Eelco Dolstra1-12/+107
2010-01-29 * Added an option "fsync-metadata" to fsync() changes toEelco Dolstra1-6/+12
/nix/var/nix/db. * Removed the function writeStringToFile since it does (almost) the same thing as writeFile.
2010-01-29 * Don't consider a store path valid if its info file exists but isEelco Dolstra1-4/+36
zero bytes long. That makes Nix more robust in case of crashes (especially on ext4).
2009-11-06 * Remove support for old (before Nix 0.12pre12020) databases.Eelco Dolstra1-0/+12
2009-09-24 * And some more.Eelco Dolstra1-0/+1
2009-09-23 * Darwin hack.Eelco Dolstra1-0/+7
2009-09-23 * Create some state directories automatically as a convenience.Eelco Dolstra1-6/+15
2009-06-13 * Canonicalise timestamps in the Nix store to 1 (1970-01-01 00:00:01Eelco Dolstra1-1/+1
UTC) rather than 0 (00:00:00). 1 is a better choice because some programs use 0 as a special value. For instance, the Template Toolkit uses a timestamp of 0 to denote the non-existence of a file, so it barfs on files in the Nix store (see template-toolkit-nix-store.patch in Nixpkgs). Similarly, Maya 2008 fails to load script directories with a timestamp of 0 and can't be patched because it's closed source. This will also shut up those "implausibly old time stamp" GNU tar warnings.
2009-04-21 * Use foreach in a lot of places.Eelco Dolstra1-9/+8
2009-04-21 * nix-store --verify: don't bail out if a referenced path is missing.Eelco Dolstra1-14/+13
(It can't fix it though.)
2009-04-16 * Fix a few "comparison is always false/true due to limited range ofEelco Dolstra1-1/+1
data type" warnings on 64-bit platforms. The one in parser.y is likely to be a real bug.