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,18 +313,13 @@ 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
{Tag, _, _, _} ->
case lists:keyfind(Tag, 1, Strategy) of case lists:keyfind(Tag, 1, Strategy) of
{Tag, TagStrat} -> {Tag, TagStrat} ->
TagStrat; TagStrat;
false -> false ->
leveled_log:log("IC012", [Tag, Strategy]), leveled_log:log("IC012", [Tag, Strategy]),
skip skip
end;
_ ->
skip
end. end.
%%%============================================================================ %%%============================================================================