-
Couldn't load subscription status.
- Fork 9
Description
I've got the following sqlite-vector loader code.
using (var cmd = connection.CreateCommand())
{
var cmdTxt = @"select load_extension(""./sqlite-plugins/vector"", ""sqlite3_vector_init"")";
cmd.CommandText = cmdTxt;
cmd.ExecuteNonQuery();
}This code runs automatically every single time I create an SQLite connection, and it succeeds 99% of the time, but fails occasionally. The good news is that it fails consistently, as in only when using HttpClient with streaming (SSE, as in Server Side Events), and from the callback (implying a callback from server, hence also a new or previously suspended background thread since HttpClient is async).
I've tried creating all sorts of "reproducibles" with multiple threads creating database connections at the same time, but I can't reproduce it, and the only common denominator is that it's invoked from a callback supplied to HttpClient, which makes it ridiculously complex to create a reproducible.
The code is identical to the code I previously used for "sqlite-vec", so at least in theory there shouldn't be anything wrong with my code, but given my "funny thread configuration" it seems to fail consistently ...
Notice, the only SQL that it executes in the command can be seen above. The connection is 100% new, and I don't use connection pooling. See the attached screenshot for the exception that occurs ...
