mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
Concurrent use a of a connection across multiple threads is not supported, but we should not crash even if a client attempts to do so. We do crash when this happens. See: https://github.com/tursodatabase/turso/issues/3911 The proper behavior is to return Busy if the same connection is already doing transactional work on another thread. To ensure the above, this PR implements Connection::atomic_swap_tx_state() which uses CAS instead of simply setting the state. This PR also adds a regression test modeled after the reproduction in #3911 that only accepts `"database is locked"` errors and panics on anything else. |
||
|---|---|---|
| .. | ||
| dart | ||
| dotnet | ||
| go | ||
| java | ||
| javascript | ||
| python | ||
| rust | ||