mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 15:34:19 +01:00
perf/throughput force sqlite to use fullfsync
This commit is contained in:
@@ -94,6 +94,7 @@ fn setup_database(db_path: &str) -> Result<Connection> {
|
||||
|
||||
conn.pragma_update(None, "journal_mode", "WAL")?;
|
||||
conn.pragma_update(None, "synchronous", "FULL")?;
|
||||
conn.pragma_update(None, "fullfsync", "true")?;
|
||||
|
||||
conn.execute(
|
||||
"CREATE TABLE IF NOT EXISTS test_table (
|
||||
@@ -116,6 +117,9 @@ fn worker_thread(
|
||||
) -> Result<u64> {
|
||||
let conn = Connection::open(&db_path)?;
|
||||
|
||||
conn.pragma_update(None, "synchronous", "FULL")?;
|
||||
conn.pragma_update(None, "fullfsync", "true")?;
|
||||
|
||||
conn.busy_timeout(std::time::Duration::from_secs(30))?;
|
||||
|
||||
start_barrier.wait();
|
||||
|
||||
Reference in New Issue
Block a user