diff --git a/simulator/generation/plan.rs b/simulator/generation/plan.rs index 39982637b..9641b5d7c 100644 --- a/simulator/generation/plan.rs +++ b/simulator/generation/plan.rs @@ -1006,7 +1006,12 @@ impl ArbitraryFrom<(&SimulatorEnv, InteractionStats)> for Interactions { _context: &C, (env, stats): (&SimulatorEnv, InteractionStats), ) -> Self { - let remaining_ = remaining(env.opts.max_interactions, &env.profile.query, &stats); + let remaining_ = remaining( + env.opts.max_interactions, + &env.profile.query, + &stats, + env.profile.experimental_mvcc, + ); let conn_index = env.choose_conn(rng); frequency( vec![ diff --git a/simulator/generation/property.rs b/simulator/generation/property.rs index 3674ed936..afa3f1b0c 100644 --- a/simulator/generation/property.rs +++ b/simulator/generation/property.rs @@ -1100,6 +1100,7 @@ pub(crate) fn remaining( max_interactions: u32, opts: &QueryProfile, stats: &InteractionStats, + mvcc: bool, ) -> Remaining { let total_weight = opts.select_weight + opts.create_table_weight @@ -1126,7 +1127,7 @@ pub(crate) fn remaining( let remaining_create = total_create .checked_sub(stats.create_count) .unwrap_or_default(); - let remaining_create_index = total_create_index + let mut remaining_create_index = total_create_index .checked_sub(stats.create_index_count) .unwrap_or_default(); let remaining_delete = total_delete @@ -1137,6 +1138,11 @@ pub(crate) fn remaining( .unwrap_or_default(); let remaining_drop = total_drop.checked_sub(stats.drop_count).unwrap_or_default(); + if mvcc { + // TODO: index not supported yet for mvcc + remaining_create_index = 0; + } + Remaining { select: remaining_select, insert: remaining_insert, @@ -1515,7 +1521,12 @@ impl ArbitraryFrom<(&SimulatorEnv, &InteractionStats, usize)> for Property { ) -> Self { let conn_ctx = &env.connection_context(conn_index); let opts = conn_ctx.opts(); - let remaining_ = remaining(env.opts.max_interactions, &env.profile.query, stats); + let remaining_ = remaining( + env.opts.max_interactions, + &env.profile.query, + stats, + env.profile.experimental_mvcc, + ); frequency( vec![ diff --git a/simulator/runner/execution.rs b/simulator/runner/execution.rs index 676fc5a2f..09c1674fe 100644 --- a/simulator/runner/execution.rs +++ b/simulator/runner/execution.rs @@ -186,7 +186,10 @@ pub fn execute_interaction_turso( tracing::error!(?results); } stack.push(results); - limbo_integrity_check(conn)?; + // TODO: skip integrity check with mvcc + if !env.profile.experimental_mvcc { + limbo_integrity_check(conn)?; + } } InteractionType::FsyncQuery(query) => { let results = interaction.execute_fsync_query(conn.clone(), env); @@ -227,7 +230,10 @@ pub fn execute_interaction_turso( stack.push(results); // Reset fault injection env.io.inject_fault(false); - limbo_integrity_check(&conn)?; + // TODO: skip integrity check with mvcc + if !env.profile.experimental_mvcc { + limbo_integrity_check(&conn)?; + } } } let _ = interaction.shadow(env.get_conn_tables_mut(interaction.connection_index));