unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Clément Lassieur" <clement@lassieur.org>
Cc: 33210@debbugs.gnu.org
Subject: [bug#33210] Cuirass: Use a SQLite in single-thread mode
Date: Thu, 8 Nov 2018 00:59:41 +0100	[thread overview]
Message-ID: <20181108005941.519c464e@scratchpost.org> (raw)
In-Reply-To: <8736sd5d8z.fsf@lassieur.org>

[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]

Hi Clément,

> > 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.  
> 
> 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.

> 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 another
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.  
> 
> 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.

> > 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.  
> 
> [...]
> 
> > Hmmmmmmmm.  I think that can be done.  

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.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-11-08  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 20:35 [bug#33210] Cuirass: Use a SQLite in single-thread mode Clément Lassieur
2018-10-30 20:47 ` [bug#33210] [PATCH 1/3] gnu: Add sqlite-with-single-thread Clément Lassieur
2018-10-30 20:47   ` [bug#33210] [PATCH 2/3] gnu: Add guile-sqlite3-with-single-thread Clément Lassieur
2018-10-30 20:47   ` [bug#33210] [PATCH 3/3] gnu: cuirass: Use SQLite in single-thread mode Clément Lassieur
2018-11-04 23:08 ` [bug#33210] Cuirass: Use a " Ludovic Courtès
2018-11-05  8:02   ` Clément Lassieur
2018-11-06  0:11     ` Danny Milosavljevic
2018-11-06  0:50       ` Clément Lassieur
2018-11-06 11:20         ` Danny Milosavljevic
2018-11-06 14:07           ` Clément Lassieur
2018-11-06 20:10             ` Danny Milosavljevic
2018-11-07 11:38               ` Clément Lassieur
2018-11-07 23:59                 ` Danny Milosavljevic [this message]
2018-11-08  7:45                   ` Clément Lassieur
2018-11-06 14:40     ` Ludovic Courtès
2018-12-13 13:57       ` bug#33210: " Clément Lassieur

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181108005941.519c464e@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=33210@debbugs.gnu.org \
    --cc=clement@lassieur.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).