mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 07:24:19 +01:00
stress: Disable database reopen and reconnect
Nikita noticed that database reopen and reconnet cause most database operations to return "database locked", which means we're not getting the coverage we need.
This commit is contained in:
@@ -519,7 +519,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
let mut conn = db.lock().await.connect()?;
|
||||
println!("\rExecuting queries...");
|
||||
for query_index in 0..nr_iterations {
|
||||
if gen_bool(0.001) {
|
||||
if gen_bool(0.001) && false {
|
||||
if opts.verbose {
|
||||
println!("Reopening database");
|
||||
}
|
||||
@@ -531,7 +531,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
}
|
||||
*db_guard = builder.build().await?;
|
||||
conn = db_guard.connect()?;
|
||||
} else if gen_bool(0.01) {
|
||||
} else if gen_bool(0.01) && false {
|
||||
// Reconnect to the database
|
||||
if opts.verbose {
|
||||
println!("Reconnecting to database");
|
||||
|
||||
Reference in New Issue
Block a user