Crash not skip on corrupted key

This commit is contained in:
Martin Sumner 2018-05-03 20:14:36 +01:00
parent 2cd20fcb47
commit aa34ffda5b

View file

@ -313,17 +313,12 @@ compact_inkerkvc({{SQN, ?INKT_STND, LK}, V, CrcCheck}, Strategy) ->
-> skip|retain|recalc. -> skip|retain|recalc.
%% @doc %% @doc
%% Work out the compaction startegy for the key %% Work out the compaction startegy for the key
get_tagstrategy(LK, Strategy) -> get_tagstrategy({Tag, _, _, _}, Strategy) ->
case LK of case lists:keyfind(Tag, 1, Strategy) of
{Tag, _, _, _} -> {Tag, TagStrat} ->
case lists:keyfind(Tag, 1, Strategy) of TagStrat;
{Tag, TagStrat} -> false ->
TagStrat; leveled_log:log("IC012", [Tag, Strategy]),
false ->
leveled_log:log("IC012", [Tag, Strategy]),
skip
end;
_ ->
skip skip
end. end.