mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-04 15:54:23 +01:00
Merge 'fix empty range error when 0 interactions are produced by creating at least 1 interaction' from Alperen Keleş
Fixes the panicking case in https://github.com/tursodatabase/limbo/issues/548 Closes #549
This commit is contained in:
@@ -147,8 +147,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),
|
||||
@@ -156,7 +160,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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user