From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QC2SChyMCF+oagAA0tVLHw (envelope-from ) for ; Fri, 10 Jul 2020 15:41:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CJpNBhyMCF9yIwAAbx9fmQ (envelope-from ) for ; Fri, 10 Jul 2020 15:41:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 93AF4940FF6 for ; Fri, 10 Jul 2020 15:41:14 +0000 (UTC) Received: from localhost ([::1]:46320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtv9F-0007xi-G5 for larch@yhetil.org; Fri, 10 Jul 2020 11:41:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtv94-0007v7-5i for bug-guix@gnu.org; Fri, 10 Jul 2020 11:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtv93-0007Vu-Pf for bug-guix@gnu.org; Fri, 10 Jul 2020 11:41:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtv93-0006D5-Nq for bug-guix@gnu.org; Fri, 10 Jul 2020 11:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 10 Jul 2020 15:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42151 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 42151-submit@debbugs.gnu.org id=B42151.159439564123837 (code B ref 42151); Fri, 10 Jul 2020 15:41:01 +0000 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 15:40:41 +0000 Received: from localhost ([127.0.0.1]:43257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtv8e-0006CL-IN for submit@debbugs.gnu.org; Fri, 10 Jul 2020 11:40:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtv8a-0006C6-RS for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 11:40:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36318) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtv8U-0007IJ-P6; Fri, 10 Jul 2020 11:40:26 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44358 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtv8U-0001jr-5n; Fri, 10 Jul 2020 11:40:26 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> <873668zzip.fsf@gnu.org> <87fta8ogf2.fsf@gnu.org> <87sge8wrdf.fsf@gnu.org> <87y2nzr94w.fsf_-_@gnu.org> <87v9iv1ssj.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 10 Jul 2020 17:40:23 +0200 In-Reply-To: <87v9iv1ssj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 10 Jul 2020 14:03:08 +0200") Message-ID: <87a707v0ns.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42151@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.49 X-TUID: euGVmoCZHY1i Ludovic Court=C3=A8s writes: Hi! > Jan Nieuwenhuizen skribis: > >>>>From dc6f96fc7de50602fb28d7ad7b8cbff09e55f538 Mon Sep 17 00:00:00 2001 >> From: "Jan (janneke) Nieuwenhuizen" >> Date: Fri, 3 Jul 2020 23:45:20 +0200 >> Subject: [PATCH 4/3] database: Do not use journal_model=3DWAL for the Hu= rd. >> Content-Transfer-Encoding: 8bit >> Content-Type: text/plain; charset=3DUTF-8 >> >> This fixes . [...] >> diff --git a/guix/store/database.scm b/guix/store/database.scm >> index a38e4d7e52..da46b0abce 100644 >> --- a/guix/store/database.scm >> +++ b/guix/store/database.scm [...] >> + ;; Using WAL breaks for the Hurd . >> + (unless (let-system (system target) >> + (equal? target "i586-pc-gnu")) >> + ;; Turn DB in "write-ahead log" mode, which should avoid SQLITE_L= OCKED >> + ;; errors when we have several readers: . >> + (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) > > I think this has the same effect as: > > (unless #t > (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) > > because this code is not in a gexp, so =E2=80=98let-system=E2=80=99 evalu= ates to an > object (not #f), and that=E2=80=99s it, it=E2=80=99s never lowered and th= e =E2=80=98equal?=E2=80=99 call > is never made. Oops. Great catch, thanks! > You want to disable WAL mode not just when running this code natively on > GNU/Hurd, but also when building a database that will eventually be used > on GNU/Hurd, right? Exactly. > In that case, I think you=E2=80=99ll have to add, say, a #:wal-mode? para= meter > to =E2=80=98call-with-database=E2=80=99 (defaulting to #true), and change= the caller to > set it appropriately. The caller, directly or indirectly, is in a gexp, > where you can use the =E2=80=98let-system=E2=80=99 expression above. > > Does that make sense? Yes, very much so. [...] After some typing, it turns out that the whole let-system is gone, we can set use a hard-coded #:wal-mode? #t in hurd-initialize-root-partition. > Thanks, and apologies for the delay! Sure, I'm happy I didn't "just push" ;-) I'm sending a v2 patch set in a minute. Greetings, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com