Concurrent writes on Turso Cloud are in beta because they were added to Turso Cloud recently. The label reflects the Cloud offering, not the engine: concurrent writes (MVCC and
BEGIN CONCURRENT) are production ready in Turso Database.BEGIN CONCURRENT let multiple writers proceed in parallel instead of waiting for a single write lock. Conflicts are detected at the row level: transactions that write to different rows commit without blocking each other.
Requirements
Concurrent writes require a Turso database, which uses the Turso Database engine rather than libSQL. Create one with:Use BEGIN CONCURRENT
Start the transaction withBEGIN CONCURRENT instead of BEGIN:
@tursodatabase/serverless for TypeScript, turso_serverless for Python and Rust.
Handle conflicts
If two concurrent transactions write to the same rows, one of them fails with a conflict error. Your application should catch the error, roll back, and retry the transaction. See Handling Conflicts for retry examples.Related
- Concurrent Writes in Turso Database: how MVCC and
BEGIN CONCURRENTwork in the engine - Feature status