From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Avoiding the garbage collector for the Guix Data Service Date: Wed, 12 Feb 2020 15:05:16 +0100 Message-ID: <87r1yzucir.fsf@gnu.org> References: <87tv4tp0c8.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42879) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1sdn-0003mm-NM for help-guix@gnu.org; Wed, 12 Feb 2020 09:05:25 -0500 In-Reply-To: <87tv4tp0c8.fsf@cbaines.net> (Christopher Baines's message of "Sat, 18 Jan 2020 09:42:31 +0000") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Christopher Baines Cc: help-guix@gnu.org Hi Christopher, Christopher Baines skribis: > The Guix Data Service has Guix compute lots of derivations, and then it > loads the data in to a database. I'm having some issues with the garbage > collector though, as sometimes it removes data from the disk before I've > had a chance to read it (at least I think this is what's happening, I > think this job failed for this reason [1]). > > 1: http://data.guix.gnu.org/job/10638 > > I'm not quite sure what the best strategy is to combat this? I had a > look, and I couldn't see how to acquire a lock to prevent the garbage > collector from running. I thought about registering thousands of gc > roots, but that seems to just move the race a bit, as there's still a > period between generating the derivation and registering the root where > it can be deleted. > > Any ideas? At the Guix Days we discussed using =E2=80=98add-temp-root=E2=80=99 and sim= ilar to ensure that .drv files are at least GC-protected for the duration of the session (connection to the daemon). Does that address your problem? Thanks, Ludo=E2=80=99.