Skip to content

Commit 80b30e9

Browse files
committed
rebase fix
1 parent 56f730d commit 80b30e9

File tree

7 files changed

+405
-371
lines changed

7 files changed

+405
-371
lines changed

simulator/generation/plan.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -719,10 +719,11 @@ fn reopen_database(env: &mut SimulatorEnv) {
719719
match env.type_ {
720720
SimulationType::Differential => {
721721
for _ in 0..num_conns {
722-
env.connections.push(SimConnection::SQLiteConnection(
723-
rusqlite::Connection::open(env.get_db_path())
724-
.expect("Failed to open SQLite connection"),
725-
));
722+
env.connections
723+
.push(Arc::new(Mutex::new(SimConnection::SQLiteConnection(
724+
rusqlite::Connection::open(env.get_db_path())
725+
.expect("Failed to open SQLite connection"),
726+
))));
726727
}
727728
}
728729
SimulationType::Default | SimulationType::Doublecheck => {
@@ -747,7 +748,9 @@ fn reopen_database(env: &mut SimulatorEnv) {
747748

748749
for _ in 0..num_conns {
749750
env.connections
750-
.push(SimConnection::LimboConnection(env.db.connect().unwrap()));
751+
.push(Arc::new(Mutex::new(SimConnection::LimboConnection(
752+
env.db.connect().unwrap(),
753+
))));
751754
}
752755
}
753756
};

simulator/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ fn run_simulation(
589589

590590
fn run_simulation_default(
591591
env: Arc<Mutex<SimulatorEnv>>,
592-
plans: &mut [InteractionPlan],
592+
plans: Arc<Vec<Arc<InteractionPlan>>>,
593593
last_execution: Arc<Mutex<Execution>>,
594594
) -> ExecutionResult {
595595
tracing::info!("Executing database interaction plan...");

simulator/runner/differential.rs

Lines changed: 153 additions & 165 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)