GNU bug report logs -
#41607
Deleted store items are not actually deleted
Previous Next
Reported by: Leo Famulari <leo <at> famulari.name>
Date: Fri, 29 May 2020 19:10:02 UTC
Severity: normal
Done: Chris Marusich <cmmarusich <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 41607 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Chris Marusich <cmmarusich <at> gmail.com> writes:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>>> Should Guix do anything about this? We could change guix-daemon to take
>>> correct action in the face of an XDEV error. We could also improve the
>>> logging, since currently it silently swallows the XDEV error.
>>
>> I guess we could delete recursively right away upon EXDEV. It should be
>> just two lines of code, right?
>
> I'll try making the change and report back. Yes, there are other cases
> where we immediately delete without moving into the trash directory
> (e.g., when the trash directory fails to be created), so it seems OK.
Here is a patch. Turns out it's was just a one line change! If nobody
has any further feedback on it, I'll go ahead and merge it to the master
branch in the next couple days.
I tested it in one of the Docker containers provided by Stephen which
exhibited the problem. I built the new Guix inside the Docker container
and verified that a path which was previously unable to be GC'd due to
the EXDEV error, was now able to be successfully GC'd.
My understanding is that the only reason why the guix-daemon attempts to
move dead directories to the trash directory is to save time on
deleting, since large directories could take a while to fully delete.
If there is any reason why it might be unsafe to delete the directories
directly in case of EXDEV (I cannot think of any), please let me know.
--
Chris
[0001-daemon-Handle-EXDEV-when-moving-to-trash-directory.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 5 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.