Add support for with_lookup head_only

head_only mode cna be run with_lookup - but there is no L0 index created in this case.

So the L0 index wasn't returning a potition list and the L0 cache wasn't being checked.

Code now checks every  position in the L0 cache, when  a lookup is attempted in head_only mode.
This commit is contained in:
Martin Sumner 2018-06-23 15:15:49 +01:00
parent 990e857ebe
commit aedeb0c934
4 changed files with 57 additions and 29 deletions

View file

@ -1108,7 +1108,13 @@ basic_headonly_test(ObjectCount, RemoveCount, HeadOnly) ->
leveled_bookie:book_head(Bookie1,
SegmentID0,
{Bucket0, Key0},
h);
h),
CheckHeadFun =
fun({add, SegID, B, K, H}) ->
{ok, H} =
leveled_bookie:book_head(Bookie1, SegID, {B, K}, h)
end,
lists:foreach(CheckHeadFun, ObjectSpecL);
no_lookup ->
{unsupported_message, head} =
leveled_bookie:book_head(Bookie1,