mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
fix empty range error when 0 interactions are produced by creating at least 1 interaction
This commit is contained in:
parent
28ae691bf7
commit
e49ba4f982
1 changed files with 6 additions and 2 deletions
|
@ -149,8 +149,12 @@ fn run_simulation(
|
|||
(read_percent, write_percent, delete_percent)
|
||||
};
|
||||
|
||||
if cli_opts.maximum_size < 1 {
|
||||
panic!("maximum size must be at least 1");
|
||||
}
|
||||
|
||||
let opts = SimulatorOpts {
|
||||
ticks: rng.gen_range(0..cli_opts.maximum_size),
|
||||
ticks: rng.gen_range(1..=cli_opts.maximum_size),
|
||||
max_connections: 1, // TODO: for now let's use one connection as we didn't implement
|
||||
// correct transactions procesing
|
||||
max_tables: rng.gen_range(0..128),
|
||||
|
@ -158,7 +162,7 @@ fn run_simulation(
|
|||
write_percent,
|
||||
delete_percent,
|
||||
page_size: 4096, // TODO: randomize this too
|
||||
max_interactions: rng.gen_range(0..cli_opts.maximum_size),
|
||||
max_interactions: rng.gen_range(1..=cli_opts.maximum_size),
|
||||
};
|
||||
let io = Arc::new(SimulatorIO::new(seed, opts.page_size).unwrap());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue