aboutsummaryrefslogtreecommitdiff
path: root/sqitch/pg/verify
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-11-04 09:02:17 +0000
committerChristopher Baines <mail@cbaines.net>2020-11-04 09:02:17 +0000
commitf787df32634323d627e5f0f14f96aa3ac58aad21 (patch)
treefe716eb8181e014496e700f1f74cc373dbf4d1a6 /sqitch/pg/verify
parent5b72f27494a0485b47701e3c054bf5da9862d1ff (diff)
downloadbuild-coordinator-f787df32634323d627e5f0f14f96aa3ac58aad21.tar
build-coordinator-f787df32634323d627e5f0f14f96aa3ac58aad21.tar.gz
Improve SQLite statement handling
The Guix Build Coordinator would segfault, and this seemed to come when preparing statements. I think this is happening because the (sqlite3) bindings finalize statements when they're out of scope, and this happens in the garbage collector thread. SQLite is running in multi-threaded mode, which means actions relating to one database connection shouldn't happen concurrently in different threads, hence I think this is leading to a segfault. To work around this behaviour, pass #:cache? #t to sqlite-prepare so statements are long lived where possible, or in the few cases where the SQL is dynamic, make sure to finalize it before the garbage collector gets a chance. This'll hopefully mean that there's less segfaults...
Diffstat (limited to 'sqitch/pg/verify')
0 files changed, 0 insertions, 0 deletions