mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
`nix-store --verify' improvements:
* 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.
This commit is contained in:
parent
80e722278c
commit
e2e168f7c2
3 changed files with 62 additions and 20 deletions
|
@ -1,6 +1,5 @@
|
|||
#include "globals.hh"
|
||||
#include "misc.hh"
|
||||
#include "pathlocks.hh"
|
||||
#include "local-store.hh"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
@ -31,7 +30,7 @@ static const int defaultGcLevel = 1000;
|
|||
read. To be precise: when they try to create a new temporary root
|
||||
file, they will block until the garbage collector has finished /
|
||||
yielded the GC lock. */
|
||||
static int openGCLock(LockType lockType)
|
||||
int LocalStore::openGCLock(LockType lockType)
|
||||
{
|
||||
Path fnGCLock = (format("%1%/%2%")
|
||||
% nixStateDir % gcLockName).str();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue