forked from lix-project/lix
Remove gc-check-reachability
This commit is contained in:
parent
82b77a7726
commit
8a945d6ddb
|
@ -101,22 +101,6 @@ Path LocalFSStore::addPermRoot(const StorePath & storePath, const Path & _gcRoot
|
||||||
makeSymlink(gcRoot, printStorePath(storePath));
|
makeSymlink(gcRoot, printStorePath(storePath));
|
||||||
addIndirectRoot(gcRoot);
|
addIndirectRoot(gcRoot);
|
||||||
|
|
||||||
/* Check that the root can be found by the garbage collector.
|
|
||||||
!!! This can be very slow on machines that have many roots.
|
|
||||||
Instead of reading all the roots, it would be more efficient to
|
|
||||||
check if the root is in a directory in or linked from the
|
|
||||||
gcroots directory. */
|
|
||||||
if (settings.checkRootReachability) {
|
|
||||||
auto roots = findRoots(false);
|
|
||||||
if (roots[storePath].count(gcRoot) == 0)
|
|
||||||
logWarning({
|
|
||||||
.name = "GC root",
|
|
||||||
.hint = hintfmt("warning: '%1%' is not in a directory where the garbage collector looks for roots; "
|
|
||||||
"therefore, '%2%' might be removed by the garbage collector",
|
|
||||||
gcRoot, printStorePath(storePath))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Grab the global GC root, causing us to block while a GC is in
|
/* Grab the global GC root, causing us to block while a GC is in
|
||||||
progress. This prevents the set of permanent roots from
|
progress. This prevents the set of permanent roots from
|
||||||
increasing while a GC is in progress. */
|
increasing while a GC is in progress. */
|
||||||
|
|
|
@ -293,10 +293,6 @@ public:
|
||||||
Setting<unsigned int> pollInterval{this, 5, "build-poll-interval",
|
Setting<unsigned int> pollInterval{this, 5, "build-poll-interval",
|
||||||
"How often (in seconds) to poll for locks."};
|
"How often (in seconds) to poll for locks."};
|
||||||
|
|
||||||
Setting<bool> checkRootReachability{this, false, "gc-check-reachability",
|
|
||||||
"Whether to check if new GC roots can in fact be found by the "
|
|
||||||
"garbage collector."};
|
|
||||||
|
|
||||||
Setting<bool> gcKeepOutputs{
|
Setting<bool> gcKeepOutputs{
|
||||||
this, false, "keep-outputs",
|
this, false, "keep-outputs",
|
||||||
R"(
|
R"(
|
||||||
|
|
Loading…
Reference in a new issue