guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#58035] sync-before-registering is false, possibly the cause of empt


From: Ludovic Courtès
Subject: [bug#58035] sync-before-registering is false, possibly the cause of empty files in the store
Date: Tue, 04 Oct 2022 09:52:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> libstore/local-store.cc has the following comment:
>
> void LocalStore::registerValidPaths(const ValidPathInfos & infos)
> {
>     /* SQLite will fsync by default, but the new valid paths may not
>     be fsync-ed.
>      * So some may want to fsync them before registering the validity,
>        at the
>      * expense of some speed of the path registering operation. */
>     if (settings.syncBeforeRegistering) sync();
>
>     [...]
> }
>
> However, currently sync-before-registering is set to 'false' AFAICT.
> I think this might be the cause of bugs like
> <https://issues.guix.gnu.org/58013> (‘Can't use "guix pull"’), and
> maybe <https://issues.guix.gnu.org/57838> (‘failing to boot, probably
> due to guix gc’).

It might be a factor, combined with the fact that the file system was
not properly unmounted (power outage or similar).

However, calling sync(2) for each store item is going to be expensive.
Recursive fsync/fdatasync calls are also likely to be too expensive (see
<https://issues.guix.gnu.org/55707> for a concrete example of the cost
on a spinning disk).

Thoughts?

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]