From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 58035@debbugs.gnu.org
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 [thread overview]
Message-ID: <874jwkvxdt.fsf@gnu.org> (raw)
In-Reply-To: <0530a80e-0a93-5a3a-ef98-5ba3683e810d@telenet.be> (Maxime Devos's message of "Sat, 24 Sep 2022 03:35:01 +0200")
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’.
next prev parent reply other threads:[~2022-10-04 8:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 1:35 [bug#58035] sync-before-registering is false, possibly the cause of empty files in the store Maxime Devos
2022-10-04 7:52 ` Ludovic Courtès [this message]
2022-10-04 14:04 ` Maxime Devos
2022-10-04 21:49 ` Ludovic Courtès
2022-10-05 7:58 ` Maxime Devos
2022-10-05 11:54 ` zimoun
2022-10-07 9:44 ` Ludovic Courtès
2022-10-17 18:03 ` zimoun
2022-10-17 18:51 ` Maxime Devos
2022-10-18 15:34 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jwkvxdt.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=58035@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).