Debug logs

This commit is contained in:
Martin Sumner 2018-05-16 10:51:59 +01:00
parent 06fd9856b5
commit 8b4adcccaf

View file

@ -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)