diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-10-14 13:49:03 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-10-14 14:15:09 +0200 |
commit | b67f38a7b91c8605a3ae9eba1e2bd3da4b579622 (patch) | |
tree | 4671725a8248dcb66e6a843321a85de715077657 /README | |
parent | 514f20a9b53ea575078ab9a413d38646bb48aa0b (diff) | |
download | cuirass-b67f38a7b91c8605a3ae9eba1e2bd3da4b579622.tar cuirass-b67f38a7b91c8605a3ae9eba1e2bd3da4b579622.tar.gz |
Queue write operations.
SQLite only allows one concurrent write query operation. Having multiple
database workers calling "db-update-build-status!", will thus increase worker
starvation. Every write operation will also be done is a single transaction.
For those reasons, create a database worker dedicated to write queries. Have
this worker queue work and issue all the queued work queries in a single
transaction.
* .dir-locals.el: Add with-db-writer-worker-thread.
* src/cuirass/database.scm (with-queue-writer-worker): Rename
"with-registration-workers" macro.
(%db-writer-channel): Rename "%db-registration-channel" variable.
(with-queue-writer-worker): Rename "with-registration-workers".
(db-register-builds): Use "with-db-writer-worker-thread" instead of
"with-db-registration-worker-thread".
(db-update-build-status!): Ditto
* src/cuirass/utils.scm (make-worker-thread-channel): Add "queue-size" and
"queue-proc" arguments.
(call-with-worker-thread): Add "options" argument.
* bin/cuirass.in (main): Use "with-queue-writer-worker" instead of
"with-registration-workers". Modify the macro scope to include all the
possible write operations.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions