mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
Merge 'perf/throughput/turso: Don't interleave concurrent transactions in on…' from Pekka Enberg
…e 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 Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3094
This commit is contained in:
@@ -150,8 +150,6 @@ async fn worker_thread(
|
||||
mode: TransactionMode,
|
||||
think_ms: u64,
|
||||
) -> Result<u64> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user