this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix offsets in second half of split inner page not starting at 0

garrison f949d48b 047faf7e

+5 -1
+2 -1
lib/btree/fuzz/model_fuzz.ex
··· 39 39 40 40 Enum.reduce(1..opts.iterations, state, fn iteration, state -> 41 41 try do 42 + Process.put(:fuzz_i, iteration) 42 43 fuzz_iteration(state) 43 44 rescue e in [ExUnit.AssertionError] -> 44 45 e = Map.update!(e, :message, &(&1 <> " (at seed=#{opts.seed}, iteration=#{inspect(iteration)})")) ··· 89 90 count = Enum.random(1..10) 90 91 reverse? = false 91 92 #dbg {start_key, count} 92 - #dbg SimpleKV.dump(simple_kv) 93 + #dbg SimpleKV.dump(simple_kv), limit: :infinity 93 94 94 95 btree_pairs = scan(btree, start_key, count, reverse?) 95 96 skv_pairs = SimpleKV.scan(simple_kv, start_key, count)
+1
lib/btree/iterator.ex
··· 110 110 end 111 111 112 112 defp do_seek_inner(page_data, slots_start, pointers_start, pointer_count, search_key, i) do 113 + assert i < (pointer_count - 1) 113 114 << 114 115 _::binary-size(slots_start + (i * c_page_slot_entry_bytes())), 115 116 key_offset::integer-16,
+2
lib/btree/writer.ex
··· 247 247 {offsets1, offsets2} = Enum.split(offsets, midpoint_i) 248 248 [offset_mid | offsets2] = offsets2 249 249 assert offsets2 != [] 250 + body2_start = hd(offsets2) 251 + offsets2 = Enum.map(offsets2, fn o -> o - body2_start end) 250 252 251 253 << 252 254 keys_data1::binary-size(offset_mid),