[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hu
From: |
Jan Nieuwenhuizen |
Subject: |
bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. |
Date: |
Fri, 10 Jul 2020 17:40:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Ludovic Courtès writes:
Hi!
> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>>>From dc6f96fc7de50602fb28d7ad7b8cbff09e55f538 Mon Sep 17 00:00:00 2001
>> From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
>> Date: Fri, 3 Jul 2020 23:45:20 +0200
>> Subject: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd.
>> Content-Transfer-Encoding: 8bit
>> Content-Type: text/plain; charset=UTF-8
>>
>> This fixes <https://bugs.gnu.org/42151>.
[...]
>> 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 <https://bugs.gnu.org/42151>.
>> + (unless (let-system (system target)
>> + (equal? target "i586-pc-gnu"))
>> + ;; Turn DB in "write-ahead log" mode, which should avoid SQLITE_LOCKED
>> + ;; errors when we have several readers:
>> <https://www.sqlite.org/wal.html>.
>> + (sqlite-exec db "PRAGMA journal_mode=WAL;"))
>
> I think this has the same effect as:
>
> (unless #t
> (sqlite-exec db "PRAGMA journal_mode=WAL;"))
>
> because this code is not in a gexp, so ‘let-system’ evaluates to an
> object (not #f), and that’s it, it’s never lowered and the ‘equal?’ 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’ll have to add, say, a #:wal-mode? parameter
> to ‘call-with-database’ (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 ‘let-system’ 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
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
- bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix., (continued)
- bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol, Jan Nieuwenhuizen, 2020/07/01
- bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol, Ludovic Courtès, 2020/07/02
- bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol, Jan Nieuwenhuizen, 2020/07/03
- bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol, Ludovic Courtès, 2020/07/03
- bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol, Jan Nieuwenhuizen, 2020/07/03
- bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd., Jan Nieuwenhuizen, 2020/07/04
- bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd., Jan Nieuwenhuizen, 2020/07/07
- bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd., Ludovic Courtès, 2020/07/10
- bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd.,
Jan Nieuwenhuizen <=
- bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol, Ludovic Courtès, 2020/07/10
bug#42151: [PATCH v2 1/4] gnu: Add sqlite/hurd with locking fix., Jan (janneke) Nieuwenhuizen, 2020/07/10
bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix for the Hurd., Jan (janneke) Nieuwenhuizen, 2020/07/10
bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix for the Hurd., Ludovic Courtès, 2020/07/11