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:
Pekka Enberg
2025-09-10 11:50:22 +03:00
parent 1d34122414
commit 0287512a47

View File

@@ -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");