Add debug log

This commit is contained in:
Martin Sumner 2018-05-16 10:34:47 +01:00
parent 3d1c085af3
commit 06fd9856b5
2 changed files with 3 additions and 1 deletions

View file

@ -478,7 +478,7 @@ foldobjects(SnapFun, Tag, KeyRanges, FoldObjFun, DeferredFetch, SegmentList) ->
% initial accumulator % initial accumulator
FoldObjFun; FoldObjFun;
false -> false ->
% no initial accumulatr passed, and so should be just a list % no initial accumulator passed, and so should be just a list
{FoldObjFun, []} {FoldObjFun, []}
end, end,

View file

@ -1364,6 +1364,7 @@ read_slots(Handle, SlotList, {SegList, BlockIndexCache}, PressMethod) ->
BL = ?BLOCK_LENGTHS_LENGTH, BL = ?BLOCK_LENGTHS_LENGTH,
case array:get(ID - 1, BlockIndexCache) of case array:get(ID - 1, BlockIndexCache) of
none -> none ->
io:format("BlockIndex cache not available for fetch_range~n"),
% If there is an attempt to use the seg list query and the % 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 % index block cache isn't cached for any part this may be
% slower as each slot will be read in turn % slower as each slot will be read in turn
@ -1378,6 +1379,7 @@ read_slots(Handle, SlotList, {SegList, BlockIndexCache}, PressMethod) ->
% present without lifting the slot off disk. Also the % present without lifting the slot off disk. Also the
% fact that we know position can be used to filter out % fact that we know position can be used to filter out
% other keys % other keys
io:format("BlockIndex cache used in fetch_range~n"),
case find_pos(BlockIdx, SegList, [], 0) of case find_pos(BlockIdx, SegList, [], 0) of
[] -> [] ->
Acc; Acc;