From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: [PATCH 1/4] utils: Change critical section terminology to worker threads. Date: Sat, 25 Jan 2020 18:46:02 +0100 Message-ID: <87r1zn8m5h.fsf@gnu.org> References: <20200124194406.29638-1-mail@cbaines.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44447) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivPVV-0000Kx-3h for guix-devel@gnu.org; Sat, 25 Jan 2020 12:46:06 -0500 In-Reply-To: <20200124194406.29638-1-mail@cbaines.net> (Christopher Baines's message of "Fri, 24 Jan 2020 19:44:03 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Christopher Baines Cc: guix-devel@gnu.org Hi, Christopher Baines skribis: > As far as I'm aware, it's necessary to use a separate thread for interact= ing > with SQLite as one of the threads used for fibers will be blocked while t= he > SQLite query is running. Indeed. > 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, an= d a > single connection isn't used in multiple threads. Serialization of database accesses comes from: commit 4612a3a70f1e70afa4e0ce00e8cb1a7848dddf58 Author: Cl=C3=A9ment Lassieur Date: Sun Aug 5 13:14:44 2018 +0200 database: Serialize all database accesses in a thread. Fixes . Apparently at the time we weren=E2=80=99t quite sure how SQLite would perfo= rm if we accessed it from several threads, but you seem to suggest that it works fine, right? Did you try it on a big database like that of berlin? > These changes start to move in this direction, first by just changing the > terminology. That=E2=80=99s also welcome! Ludo=E2=80=99.