From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/4] utils: Change critical section terminology to worker threads.
Date: Sat, 25 Jan 2020 22:59:33 +0000 [thread overview]
Message-ID: <875zgz87my.fsf@cbaines.net> (raw)
In-Reply-To: <87r1zn8m5h.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
>> This doesn't mean all queries have to be executed one at a time though,
>> providing the queries are executed outside the threads used by fibers, and a
>> single connection isn't used in multiple threads.
>
> Serialization of database accesses comes from:
>
> commit 4612a3a70f1e70afa4e0ce00e8cb1a7848dddf58
> Author: Clément Lassieur <clement@lassieur.org>
> Date: Sun Aug 5 13:14:44 2018 +0200
>
> database: Serialize all database accesses in a thread.
>
> Fixes <https://bugs.gnu.org/32234>.
>
> Apparently at the time we weren’t quite sure how SQLite would perform if
> we accessed it from several threads, but you seem to suggest that it
> works fine, right?
Yeah, the documentation suggests it can work [1]. We're even opening the
database in multi-threaded mode already (SQLITE_OPEN_NOMUTEX).
1: https://www.sqlite.org/threadsafe.html
> Did you try it on a big database like that of berlin?
I have an old copy of the berlin database, and it seems to work fine
with that. At least the web interface that is, but if that works,
everything else should work too.
>> These changes start to move in this direction, first by just changing the
>> terminology.
>
> That’s also welcome!
I've gone ahead an pushed these patches now, as it's something I'd like
to deploy prior to the Guix days.
Thanks for taking a look,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
next prev parent reply other threads:[~2020-01-25 22:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 19:44 [PATCH 1/4] utils: Change critical section terminology to worker threads Christopher Baines
2020-01-24 19:44 ` [PATCH 2/4] Adjust make-worker-thread-channel to take an initializer Christopher Baines
2020-01-24 19:44 ` [PATCH 3/4] Enable make-worker-thread-channel to create multiple worker threads Christopher Baines
2020-01-24 19:44 ` [PATCH 4/4] database: Enable running up to 4 database queries at once Christopher Baines
2020-01-25 17:47 ` Ludovic Courtès
2020-01-25 17:46 ` [PATCH 1/4] utils: Change critical section terminology to worker threads Ludovic Courtès
2020-01-25 22:59 ` Christopher Baines [this message]
2020-01-28 10:27 ` Ludovic Courtès
2020-01-28 17:19 ` Christopher Baines
2020-01-29 16:26 ` 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=875zgz87my.fsf@cbaines.net \
--to=mail@cbaines.net \
--cc=guix-devel@gnu.org \
--cc=ludo@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.