From 6e9ba4c56158a7708f70319114879c064417b8a1 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sun, 14 Sep 2025 10:50:25 +0300 Subject: [PATCH] perf/throughput/turso: Don't interleave concurrent transactions in one connection With BEGIN CONCURRENT, we cannot use the same connection all the time because there's no way for the transaction manager to know which transaction belongs to what "session" -- they're all individual statements executed in the context of the one connection. Fixes #3093 --- perf/throughput/turso/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/perf/throughput/turso/src/main.rs b/perf/throughput/turso/src/main.rs index 8995fa710..5fc17d90a 100644 --- a/perf/throughput/turso/src/main.rs +++ b/perf/throughput/turso/src/main.rs @@ -150,8 +150,6 @@ async fn worker_thread( mode: TransactionMode, think_ms: u64, ) -> Result { - let conn = db.connect()?; - start_barrier.wait(); let start_time = Instant::now(); @@ -160,7 +158,7 @@ async fn worker_thread( let mut tx_futs = vec![]; for iteration in 0..iterations { - let conn = conn.clone(); + let conn = db.connect()?; let total_inserts = Arc::clone(&total_inserts); let tx_fut = async move { let mut stmt = conn