From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKf0v-0001lm-P4 for guix-patches@gnu.org; Thu, 08 Nov 2018 02:46:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKf0s-0007oR-Hv for guix-patches@gnu.org; Thu, 08 Nov 2018 02:46:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35966) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKf0s-0007nh-Bu for guix-patches@gnu.org; Thu, 08 Nov 2018 02:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKf0r-0007Ac-VG for guix-patches@gnu.org; Thu, 08 Nov 2018 02:46:01 -0500 Subject: [bug#33210] Cuirass: Use a SQLite in single-thread mode Resent-Message-ID: References: <87a7mvqikl.fsf@lassieur.org> <871s80o2zc.fsf@gnu.org> <87ftwgq7da.fsf@lassieur.org> <20181106011154.3f235763@scratchpost.org> <87efbzqbb0.fsf@lassieur.org> <20181106122036.25bad548@scratchpost.org> <875zxa5mfn.fsf@lassieur.org> <20181106211049.1469331b@scratchpost.org> <8736sd5d8z.fsf@lassieur.org> <20181108005941.519c464e@scratchpost.org> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <20181108005941.519c464e@scratchpost.org> Date: Thu, 08 Nov 2018 08:45:33 +0100 Message-ID: <878t24qag2.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 33210@debbugs.gnu.org, Andy Wingo Danny Milosavljevic writes: > Hi Cl=C3=A9ment, > >> > Yeah, right now users can query something using the web interface while >> > a build is updating (or running) at the cost of the returned data being >> > potentially very strange.=20=20 >>=20 >> This is quite unlikely. > > When testing the cuirass status frontend it happened regularily without > me trying to make it happen - took quite some time to find the cause, too. Maybe it happened without me noticing then. I'll trust you on this :-) >> No, there are no SQL requests during the build. There are some before >> the build, and some after the build. But they are all short. > > Yes, if there is one transaction right before starting the build and anot= her > transaction at the end of the build, then it's much better. > >> > I have to say I liked the external evaluator much more since then all >> > this complexity would be contained in the external program and it would >> > just magically work without special-casing any of this stuff.=20=20 >>=20 >> The evaluator is still external, I'm not sure what you are talking >> about. > > Hmm, I'll read through the source for a bit. I was of the impression > that now the cuirass main process did the updating of the build status > rather than the evaluator. Oh, yes, the updating of the build status is done by the main process, but the evaluator is still external and doesn't query the database. Why don't you like that? >> > It's difficult for guile-sqlite3 to handle SQLITE_BUSY correctly since >> > sqlite also uses SQLITE_BUSY to indicate errors that you are supposed = to >> > fail on.=20=20 >>=20 >> [...] >>=20 >> > Hmmmmmmmm. I think that can be done.=20=20 > > I've tried it and it works well enough, although some of the sqlite > documentation makes it sound like one cannot *just* retry some of the > calls (for example: sqlite3_step). > > It's one of the disadantages of fibers that every C library has to have > special code in it to support it somehow (if at all) - it means that > it has to be written in a way to make all calls non-blocking. Indeed. I wonder how goroutines deal with this. Cc'ing Andy. Cl=C3=A9ment