Artifact 25d003d6d88fa648fe65425ba4ea55a25f7e2fbaa8134c3b6216ff69c4e9db1f:
Fixes #33: db.WithTx opens BEGIN DEFERRED, so under WAL two concurrent writers race the SHARED→RESERVED upgrade and SQLite's deadlock-avoidance returns SQLITE_BUSY immediately — bypassing busy_timeout entirely.
DSN now sets _txlock=immediate in both modernc and ncruces drivers so every BEGIN acquires RESERVED upfront. The second concurrent writer blocks at BEGIN (where busy_timeout applies) instead of racing at the upgrade.
Verified empirically: 50/50 fail without fix, 0/50 with fix.". by [email protected] on 2026-05-13 19:10:40.
D 2026-05-13T19:10:40 T +sym-v0.6.3 202576c58c87d35a6253ce96e9032a545be0942eace8a0481157cbfdb167046a v0.6.3\s—\sfix\sconcurrent-writer\sSQLITE_BUSY\srace\n\nFixes\s#33:\sdb.WithTx\sopens\sBEGIN\sDEFERRED,\sso\sunder\sWAL\stwo\sconcurrent\nwriters\srace\sthe\sSHARED→RESERVED\supgrade\sand\sSQLite's\sdeadlock-avoidance\nreturns\sSQLITE_BUSY\simmediately\s—\sbypassing\sbusy_timeout\sentirely.\n\nDSN\snow\ssets\s_txlock=immediate\sin\sboth\smodernc\sand\sncruces\sdrivers\sso\nevery\sBEGIN\sacquires\sRESERVED\supfront.\sThe\ssecond\sconcurrent\swriter\nblocks\sat\sBEGIN\s(where\sbusy_timeout\sapplies)\sinstead\sof\sracing\sat\sthe\nupgrade.\n\nVerified\sempirically:\s50/50\sfail\swithout\sfix,\s0/50\swith\sfix. U [email protected] Z e352151e8b465bad787ca50a018231a5