Compaction test error
Compaction tests now throwing up different corruption points
This commit is contained in:
parent
8bcb49479d
commit
32ac305c67
2 changed files with 23 additions and 14 deletions
|
@ -226,7 +226,9 @@ compact_inkerkvc({{SQN, ?INKT_STND, LK}, V, CrcCheck}, Strategy) ->
|
||||||
{TagStrat, {{SQN, ?INKT_KEYD, LK}, {null, KeyDeltas}, CrcCheck}};
|
{TagStrat, {{SQN, ?INKT_KEYD, LK}, {null, KeyDeltas}, CrcCheck}};
|
||||||
TagStrat ->
|
TagStrat ->
|
||||||
{TagStrat, null}
|
{TagStrat, null}
|
||||||
end.
|
end;
|
||||||
|
compact_inkerkvc(_KVC, _Strategy) ->
|
||||||
|
skip.
|
||||||
|
|
||||||
split_inkvalue(VBin) ->
|
split_inkvalue(VBin) ->
|
||||||
case is_binary(VBin) of
|
case is_binary(VBin) of
|
||||||
|
|
|
@ -238,19 +238,26 @@ check_single_file(CDB, FilterFun, FilterServer, MaxSQN, SampleSize, BatchSize) -
|
||||||
FN = leveled_cdb:cdb_filename(CDB),
|
FN = leveled_cdb:cdb_filename(CDB),
|
||||||
PositionList = leveled_cdb:cdb_getpositions(CDB, SampleSize),
|
PositionList = leveled_cdb:cdb_getpositions(CDB, SampleSize),
|
||||||
KeySizeList = fetch_inbatches(PositionList, BatchSize, CDB, []),
|
KeySizeList = fetch_inbatches(PositionList, BatchSize, CDB, []),
|
||||||
R0 = lists:foldl(fun(KS, {ActSize, RplSize}) ->
|
|
||||||
{{SQN, _Type, PK}, Size} = KS,
|
FoldFunForSizeCompare =
|
||||||
Check = FilterFun(FilterServer, PK, SQN),
|
fun(KS, {ActSize, RplSize}) ->
|
||||||
case {Check, SQN > MaxSQN} of
|
case KS of
|
||||||
{true, _} ->
|
{{SQN, _Type, PK}, Size} ->
|
||||||
{ActSize + Size - ?CRC_SIZE, RplSize};
|
Check = FilterFun(FilterServer, PK, SQN),
|
||||||
{false, true} ->
|
case {Check, SQN > MaxSQN} of
|
||||||
{ActSize + Size - ?CRC_SIZE, RplSize};
|
{true, _} ->
|
||||||
_ ->
|
{ActSize + Size - ?CRC_SIZE, RplSize};
|
||||||
{ActSize, RplSize + Size - ?CRC_SIZE}
|
{false, true} ->
|
||||||
end end,
|
{ActSize + Size - ?CRC_SIZE, RplSize};
|
||||||
{0, 0},
|
_ ->
|
||||||
KeySizeList),
|
{ActSize, RplSize + Size - ?CRC_SIZE}
|
||||||
|
end;
|
||||||
|
_ ->
|
||||||
|
{ActSize, RplSize}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
R0 = lists:foldl(FoldFunForSizeCompare, {0, 0}, KeySizeList),
|
||||||
{ActiveSize, ReplacedSize} = R0,
|
{ActiveSize, ReplacedSize} = R0,
|
||||||
Score = case ActiveSize + ReplacedSize of
|
Score = case ActiveSize + ReplacedSize of
|
||||||
0 ->
|
0 ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue