Replies: 1 comment
-
|
Hm. AFAICT this would be an issue in SQLite upstream, unless you have evidence that there's a place where the library is swallowing the error code. (See #133 for a recent example of this.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using
sqlitexin a concurrent-execution environment toSELECTdata from a single SQLite database on the file system and it's going well (thank you for your efforts!). Up to 100 executions are run concurrently in context with a timeout of 10s, after which any results get collated and handed off, and any interrupterrs are ignored. Non-interrupt errors are treated as fatal and exit the parent process. SQL executions work fine up until the timeout occurs, after which I check for interruption like so:and this works almost all of the time. However, it seems that an interrupt at particular moments may not yield
sqlite.ResultInterrupt, instead very occasionally erroring like so:The surrounding context has been cancelled at this point due to timeout, and
ShouldStopcalled to check theerr, but it's not ansqlite.ResultInterruptso becomes fatal. I've truncated the rather long SQL query, but suffice to say that it has multipleSELECT * FROM json_each(:xyz)calls in it accessing separate bind parameters, and these are the only calls I'm making tojson_each.The underlying SQLite file is fine on the file system - it's been being queried en masse successfully for the previous 10s and only the executions still running post-deadline return errors like this. In the above error, 6 interrupted goroutines all errored in the same manner,
sqlite: prepare: "...": SQL logic error: vtable constructor failed: json_each.I've tried creating an isolated test case to replicate this (with race conditions cancelling the
ctxand/or closing theSetInterruptchannel at varying times) but haven't successfully triggered anSQL logic errorout ofgo-sqlite/sqlite.go
Line 468 in f1ff619
sqlite: prepare: interruptedandsqlite: step: interruptedthus far.I'm using the following versions:
Beta Was this translation helpful? Give feedback.
All reactions