[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] guix-daemon: Add option to disable garbage collection.
From: |
Roel Janssen |
Subject: |
Re: [PATCH] guix-daemon: Add option to disable garbage collection. |
Date: |
Wed, 11 Apr 2018 09:57:51 +0200 |
User-agent: |
mu4e 1.0; emacs 25.3.1 |
Roel Janssen <address@hidden> writes:
> Ludovic Courtès <address@hidden> writes:
>
>> Hello Roel,
>>
>> Roel Janssen <address@hidden> skribis:
>>
>>> The patch adds a “disableGarbageCollection” boolean variable to the
>>> guix-daemon settings, and on each occasion where a store item may be
>>> deleted, it checks this option.
>>>
>>> This option can be set using “--disable-gc”.
>>>
>>> It would be great if someone could review this and discuss whether
>>> this is the right way to implement such a feature. And to point out
>>> what else would be needed to include this option in guix-daemon.
>>
>> I suppose the use case is when guix-daemon runs on a machine and is
>> accessed over TCP/IP (with GUIX_DAEMON_SOCKET=guix://…) from other
>> machines, right?
>
> That's right.
>
>> In this case, I thought guix-daemon could explicitly check whether the
>> peer is remote, and disable GC in that case. That is, ‘guix gc’ would
>> still work locally on the machine that runs guix-daemon, but it would no
>> longer work remotely.
>>
>> How does that sound?
>
> That sounds like it solves our use-case, but only because in our
> case the access to the machine running guix-daemon is limited.
>
> So, even though I'm not sure how to implement this, your solution is
> fine with me.
I implemented the solution in the attached patch. When a connection
does not come from the UNIX socket, it is treated as “remote”. So,
local TCP connections would also be treated as “remote”.
I assumed ‘collectGarbage()’ is the entry point for all garbage collection,
is that correct?
Kind regards,
Roel Janssen
0001-guix-daemon-Disable-garbage-collection-for-remote-ho.patch
Description: Text Data
- [PATCH] guix-daemon: Add option to disable garbage collection., Roel Janssen, 2018/04/03
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Ludovic Courtès, 2018/04/03
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Roel Janssen, 2018/04/03
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Ludovic Courtès, 2018/04/19
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Roel Janssen, 2018/04/19
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Ludovic Courtès, 2018/04/19
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Roel Janssen, 2018/04/19
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Ludovic Courtès, 2018/04/19
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Roel Janssen, 2018/04/19
- Re: [PATCH] guix-daemon: Add option to disable garbage collection., Marius Bakke, 2018/04/19