mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 03:54:21 +01:00
disable integrity check and indexes when using mvcc
This commit is contained in:
@@ -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![
|
||||
|
||||
@@ -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![
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user