Subject: bug#32234: [PATCH 2/2] database: Serialize all database accesses in a thread.

From: Clément Lassieur <[email-masked]>
Date: Mon, 06 Aug 2018 21:35:08 +0200

Hi,

Clément Lassieur <[email-masked]> writes:

[...]

>  bin/cuirass.in           |  23 +-
>  src/cuirass/base.scm     |  94 +++----
>  src/cuirass/database.scm | 550 +++++++++++++++++++++------------------
>  src/cuirass/http.scm     | 136 +++++-----
>  src/cuirass/utils.scm    |  23 +-
>  tests/database.scm       | 103 ++++----
>  tests/http.scm           |  21 +-
>  7 files changed, 494 insertions(+), 456 deletions(-)

Pros:
  - fix the fact that long SQL queries block the scheduler
  - simplify the code, and make it more uniform

Cons:
  - we don't take advantage of the SQLite multi-threading features
    anymore

I've run some tests, and I didn't see any difference in terms of
performance.

Clément