tests: pin pooled-dispatch concurrency; sqlite pins follow THREADSAFE=1
server_http gains the case that caught the live crash: 1000 keep-alive requests at c=10 against /api/apps (full SQLite load per request, on the 4-worker pool) must complete with 0 failures and leave the server answering. sqlite_api's threadsafe pins flip to guard the NEW invariant — a regression to THREADSAFE=0 reintroduces heap corruption under the pool (free-of-unallocated inside yy_reduce, caught under ab -c20).
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
// every wrapper family beyond the P5.1 smoke (which keeps owning the
|
||||
// vendored-version pin):
|
||||
//
|
||||
// * library: version_number, sourceid, threadsafe=false (built
|
||||
// THREADSAFE=0), compileoption_used, complete, errstr, strglob/
|
||||
// * library: version_number, sourceid, threadsafe=true (built
|
||||
// THREADSAFE=1 since std.thread pools share the library),
|
||||
// compileoption_used, complete, errstr, strglob/
|
||||
// strlike/stricmp, randomness.
|
||||
// * connections: open_v2 flag behavior (READONLY on a missing file
|
||||
// refuses; CREATE works; db_readonly reflects the mode),
|
||||
@@ -37,8 +38,8 @@ run_case :: (label: string, ok: bool) -> i32 {
|
||||
check_library_info :: () -> bool {
|
||||
if sq.sqlite_version_number() < 3053000 { return false; }
|
||||
if sq.sqlite_sourceid().len < 10 { return false; }
|
||||
if sq.sqlite_threadsafe() { return false; } // THREADSAFE=0 build
|
||||
if !sq.sqlite_compileoption_used("THREADSAFE=0") { return false; }
|
||||
if !sq.sqlite_threadsafe() { return false; } // THREADSAFE=1: std.thread-era pools share the library (PLAN-HTTPZ A2)
|
||||
if !sq.sqlite_compileoption_used("THREADSAFE=1") { return false; }
|
||||
if sq.sqlite_compileoption_get(0).len == 0 { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user