GNU bug report logs -
#32209
Cuirass: Use SQLite in Multi-thread mode
Previous Next
Reported by: Clément Lassieur <clement <at> lassieur.org>
Date: Thu, 19 Jul 2018 10:56:01 UTC
Severity: normal
Tags: patch
Done: Clément Lassieur <clement <at> lassieur.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32209 in the body.
You can then email your comments to 32209 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#32209
; Package
guix-patches
.
(Thu, 19 Jul 2018 10:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Clément Lassieur <clement <at> lassieur.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 19 Jul 2018 10:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This disables mutexing on database connection and prepared statement objects,
thus making us responsible for serializing access to database connections and
prepared statements. It may result in a performance improvement.
* src/cuirass/database.scm (db-init, db-open): Pass the SQLITE_OPEN_NOMUTEX
flag to SQLITE-OPEN.
---
src/cuirass/database.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index a84d0fa..6bf3bc4 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -195,7 +195,8 @@ database object."
(format (current-error-port) "Removing leftover database ~a~%" db-name)
(delete-file db-name))
(let ((db (sqlite-open db-name (logior SQLITE_OPEN_CREATE
- SQLITE_OPEN_READWRITE))))
+ SQLITE_OPEN_READWRITE
+ SQLITE_OPEN_NOMUTEX))))
(db-load db schema)
(db-set-schema-version db (latest-db-schema-version))
db))
@@ -222,7 +223,9 @@ database object."
;; avoid SQLITE_LOCKED errors when we have several readers:
;; <https://www.sqlite.org/wal.html>.
(set-db-options (if (file-exists? db)
- (db-upgrade (sqlite-open db SQLITE_OPEN_READWRITE))
+ (db-upgrade
+ (sqlite-open db (logior SQLITE_OPEN_READWRITE
+ SQLITE_OPEN_NOMUTEX)))
(db-init db))))
(define (db-close db)
--
2.18.0
Changed bug title to '[cuirass] Use SQLite in Multi-thread mode.' from '[PATCH] database: Use SQLite in Multi-thread mode.'
Request was from
clement <at> lassieur.org (Clément Lassieur)
to
control <at> debbugs.gnu.org
.
(Thu, 19 Jul 2018 12:03:02 GMT)
Full text and
rfc822 format available.
Changed bug title to 'Cuirass: Use SQLite in Multi-thread mode.' from '[cuirass] Use SQLite in Multi-thread mode.'
Request was from
clement <at> lassieur.org (Clément Lassieur)
to
control <at> debbugs.gnu.org
.
(Thu, 19 Jul 2018 12:46:02 GMT)
Full text and
rfc822 format available.
Changed bug title to 'Cuirass: Use SQLite in Multi-thread mode' from 'Cuirass: Use SQLite in Multi-thread mode.'
Request was from
clement <at> lassieur.org (Clément Lassieur)
to
control <at> debbugs.gnu.org
.
(Thu, 19 Jul 2018 12:47:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#32209
; Package
guix-patches
.
(Fri, 20 Jul 2018 12:56:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 32209 <at> debbugs.gnu.org (full text, mbox):
Hello!
Clément Lassieur <clement <at> lassieur.org> skribis:
> This disables mutexing on database connection and prepared statement objects,
> thus making us responsible for serializing access to database connections and
> prepared statements. It may result in a performance improvement.
>
> * src/cuirass/database.scm (db-init, db-open): Pass the SQLITE_OPEN_NOMUTEX
> flag to SQLITE-OPEN.
Could you copy (part of) the paragraph above as a comment above the
‘sqlite-open’ call in ‘db-open’?
Then I guess you can go ahead and push!
Thank you,
Ludo’.
Reply sent
to
Clément Lassieur <clement <at> lassieur.org>
:
You have taken responsibility.
(Fri, 20 Jul 2018 13:24:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Clément Lassieur <clement <at> lassieur.org>
:
bug acknowledged by developer.
(Fri, 20 Jul 2018 13:24:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 32209-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hello!
>
> Clément Lassieur <clement <at> lassieur.org> skribis:
>
>> This disables mutexing on database connection and prepared statement objects,
>> thus making us responsible for serializing access to database connections and
>> prepared statements. It may result in a performance improvement.
>>
>> * src/cuirass/database.scm (db-init, db-open): Pass the SQLITE_OPEN_NOMUTEX
>> flag to SQLITE-OPEN.
>
> Could you copy (part of) the paragraph above as a comment above the
> ‘sqlite-open’ call in ‘db-open’?
Done, and pushed. Thanks!
Clément
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 18 Aug 2018 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.