From 06fd9856b54f5c25c3a79fe9146600ae1503ad85 Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Wed, 16 May 2018 10:34:47 +0100 Subject: [PATCH] Add debug log --- src/leveled_runner.erl | 2 +- src/leveled_sst.erl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/leveled_runner.erl b/src/leveled_runner.erl index c9dc03a..37f7163 100644 --- a/src/leveled_runner.erl +++ b/src/leveled_runner.erl @@ -478,7 +478,7 @@ foldobjects(SnapFun, Tag, KeyRanges, FoldObjFun, DeferredFetch, SegmentList) -> % initial accumulator FoldObjFun; false -> - % no initial accumulatr passed, and so should be just a list + % no initial accumulator passed, and so should be just a list {FoldObjFun, []} end, diff --git a/src/leveled_sst.erl b/src/leveled_sst.erl index 22fbd0a..53f1bd0 100644 --- a/src/leveled_sst.erl +++ b/src/leveled_sst.erl @@ -1364,6 +1364,7 @@ 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 @@ -1378,6 +1379,7 @@ 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;