Compaction of already compacted journals

Ensure that journals with a large volume of key deltas do not erroneously get repeatedly compacted.
This commit is contained in:
Martin Sumner 2019-07-24 18:03:22 +01:00
parent 21e0ce70e7
commit 22e732841c
3 changed files with 94 additions and 19 deletions

View file

@ -35,6 +35,7 @@
from_inkerkv/2,
from_journalkey/1,
revert_to_keydeltas/2,
is_compaction_candidate/1,
split_inkvalue/1,
check_forinkertype/2,
get_tagstrategy/2,
@ -559,7 +560,13 @@ check_forinkertype(_LedgerKey, head_only) ->
check_forinkertype(_LedgerKey, _Object) ->
?INKT_STND.
-spec is_compaction_candidate(journal_key()) -> boolean().
%% @doc
%% Only journal keys with standard objects should be scored for compaction
is_compaction_candidate({_SQN, ?INKT_STND, _LK}) ->
true;
is_compaction_candidate(_OtherJKType) ->
false.
%%%============================================================================