GNU bug report logs - #51427
[PATCH] nix: libstore: Do not remove unused links when deleting specific items.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 27 Oct 2021 03:50:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>, Maxime Devos <maximedevos <at> telenet.be>
Cc: 51427 <at> debbugs.gnu.org, Tobias Geerinckx-Rice <me <at> tobias.gr>, maxim.cournoyer <at> gmail.com, zimon.toutoune <at> gmail.com
Subject: [bug#51427] [PATCH] nix: libstore: Do not remove unused links when deleting specific items.
Date: Sat, 23 Jul 2022 08:52:40 +0200
Am Samstag, dem 23.07.2022 um 01:07 +0200 schrieb Ludovic Courtès:
> Hi,
> 
> Maxime Devos <maximedevos <at> telenet.be> skribis:
> 
> > On 22-07-2022 14:14, Ludovic Courtès wrote:
> > > Hi,
> > > 
> > > Liliana Marie Prikler<liliana.prikler <at> gmail.com>  skribis:
> > > 
> > > > I don't think deleting links will ever be fast on that disk. 
> > > > But what I've been saying the whole time is that I don't always
> > > > need the links deleted.  I think adding "expert" switches to
> > > > skip these phases might actually be enough – after all, if I
> > > > ever do want to run a full GC, the information ought to be the
> > > > same, no?
> > > The expert will have to know that skipping that phase will have
> > > the effect of *not* freeing space on the device, so…
> > 
> > I believe the word "expert" implies that the expert knows that,
> 
> Apologies for being elliptic.  My point here, as has been discussed
> earlier in this thread, is that we can’t just skip that phase or we’d
> simply leave files around without actually deleting them.
> 
> Thus, a command-line switch to skip the phase doesn’t seem valuable
> to me because it’d let users run the GC in a way that doesn’t
> actually collect garbage.
> 
> I hope this is clearer!
As noted before, I don't always run GC to free up X amount of space. 
Even if I did, link deletion is greedy and frees up whatever it can. 
So the initial suggestion to only look at what might have been freed in
this gc already makes sense.  However, it was ruled complicated because
the GC is implemented in C++.  

My personal motivation to just skip the phase entirely comes from the
hypothesis that the store is in a sane state even if the links are not
deleted.  Particularly, if I `guix gc broken-item' and `guix build
broken-item', even without deleting links, the broken-item should now
be fixed.  This has practical advantages over `guix build --repair': if
the last `guix package' or `guix system' failed mid-way, any user, not
just root, can simply `guix gc' the broken items.

Now, I understand that as a default, you never want to skip this phase,
because it doesn't actually free up disk space.  But if you have a slow
disk with large space, do you really need to free all that much space,
or would it be fine to delay freeing it until a later date?

Cheers




This bug report was last modified 2 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.