Never check inker if head_only

This commit is contained in:
Martin Sumner 2018-09-28 16:58:28 +01:00
parent b1ae7837a1
commit b7c8304d99

View file

@ -1192,7 +1192,14 @@ handle_call({head, Bucket, Key, Tag}, _From, State)
{SeqN, {active, TS}, _MH, MD} -> {SeqN, {active, TS}, _MH, MD} ->
case TS >= leveled_util:integer_now() of case TS >= leveled_util:integer_now() of
true -> true ->
case journal_notfound(State#state.ink_checking, CheckFrequency =
case State#state.head_only of
true ->
0;
false ->
State#state.ink_checking
end,
case journal_notfound(CheckFrequency,
State#state.inker, State#state.inker,
LK, LK,
SeqN) of SeqN) of
@ -2847,7 +2854,9 @@ check_notfound_test() ->
?assertMatch(?MIN_KEYCHECK_FREQUENCY, MinFreq), ?assertMatch(?MIN_KEYCHECK_FREQUENCY, MinFreq),
?assertMatch({true, ?MAX_KEYCHECK_FREQUENCY}, ?assertMatch({true, ?MAX_KEYCHECK_FREQUENCY},
check_notfound(?MAX_KEYCHECK_FREQUENCY, MissingFun)). check_notfound(?MAX_KEYCHECK_FREQUENCY, MissingFun)),
?assertMatch({false, 0}, check_notfound(0, MissingFun)).
-endif. -endif.