From 8b4adcccaf193f2802830d398f46e0cdbcebf9c6 Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Wed, 16 May 2018 10:51:59 +0100 Subject: [PATCH] Debug logs --- src/leveled_sst.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/leveled_sst.erl b/src/leveled_sst.erl index 53f1bd0..74258a7 100644 --- a/src/leveled_sst.erl +++ b/src/leveled_sst.erl @@ -369,6 +369,7 @@ sst_getkvrange(Pid, StartKey, EndKey, ScanWidth) -> %% leveled_tictac sst_getfilteredrange(Pid, StartKey, EndKey, ScanWidth, SegList) -> SegList0 = tune_seglist(SegList), + io:format("Using tuned seglist ~w~n", [SegList0]), case gen_fsm:sync_send_event(Pid, {get_kvrange, StartKey, EndKey, @@ -1364,7 +1365,6 @@ read_slots(Handle, SlotList, {SegList, BlockIndexCache}, PressMethod) -> BL = ?BLOCK_LENGTHS_LENGTH, case array:get(ID - 1, BlockIndexCache) of none -> - io:format("BlockIndex cache not available for fetch_range~n"), % If there is an attempt to use the seg list query and the % index block cache isn't cached for any part this may be % slower as each slot will be read in turn @@ -1379,7 +1379,6 @@ read_slots(Handle, SlotList, {SegList, BlockIndexCache}, PressMethod) -> % present without lifting the slot off disk. Also the % fact that we know position can be used to filter out % other keys - io:format("BlockIndex cache used in fetch_range~n"), case find_pos(BlockIdx, SegList, [], 0) of [] -> Acc; @@ -1683,6 +1682,7 @@ find_pos(<<1:1/integer, PotentialHit:15/integer, T/binary>>, HashList, PosList, Count) when is_list(HashList) -> case lists:member(PotentialHit, HashList) of true -> + io:format("Found pos based on ~w~n", [PotentialHit]), find_pos(T, HashList, PosList ++ [Count], Count + 1); false -> find_pos(T, HashList, PosList, Count + 1)