Skip to content

Commit

Permalink
tree_fuzz: fix false positive
Browse files Browse the repository at this point in the history
1_000 was an out of thin air constant I used for testing, lets use
the correct value here

Seed: ./zig/zig build -Drelease fuzz -- --seed=8888456137543307989 lsm_tree
  • Loading branch information
matklad committed May 2, 2024
1 parent e39b66c commit 93d2916
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lsm/tree_fuzz.zig
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,14 @@ const Model = struct {
table_usage: TableUsage,

fn init(table_usage: TableUsage) !Model {
const model_node_count = std.math.divCeil(
u32,
events_max * @sizeOf(Value),
NodePool.node_size,
) catch unreachable;
return .{
.array = try Array.init(allocator),
.node_pool = try NodePool.init(allocator, 1_000),
.node_pool = try NodePool.init(allocator, model_node_count),
.table_usage = table_usage,
};
}
Expand Down

0 comments on commit 93d2916

Please sign in to comment.