From: Maxime Devos <maximedevos@telenet.be>
To: 58035@debbugs.gnu.org
Subject: [bug#58035] sync-before-registering is false, possibly the cause of empty files in the store
Date: Sat, 24 Sep 2022 03:35:01 +0200 [thread overview]
Message-ID: <0530a80e-0a93-5a3a-ef98-5ba3683e810d@telenet.be> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 1089 bytes --]
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’).
As such, I think we need to set it to 'true' by default instead. Or if
that turns out to be too expensive, instead do a recursive 'fsync' on
the 'paths' (store items) that are about to be registered (and maybe
some other tricks like disabling the 'fsync/sync' for most tests).
(Unverified if this solves those issues, just an idea ...)
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next reply other threads:[~2022-09-24 1:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 1:35 Maxime Devos [this message]
2022-10-04 7:52 ` [bug#58035] sync-before-registering is false, possibly the cause of empty files in the store Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0530a80e-0a93-5a3a-ef98-5ba3683e810d@telenet.be \
--to=maximedevos@telenet.be \
--cc=58035@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.