Fix empty slot issue
This commit is contained in:
parent
a07770a3df
commit
1f8de798bd
1 changed files with 13 additions and 1 deletions
|
@ -1142,7 +1142,7 @@ merge_lists(KVList1, KVList2, LI, SlotList, SlotCount) ->
|
||||||
KVRem2,
|
KVRem2,
|
||||||
Slot} = form_slot(KVList1, KVList2, LI, no_lookup, 0, []),
|
Slot} = form_slot(KVList1, KVList2, LI, no_lookup, 0, []),
|
||||||
case Slot of
|
case Slot of
|
||||||
[] ->
|
{_, []} ->
|
||||||
merge_lists(KVRem1, KVRem2, LI, SlotList, SlotCount);
|
merge_lists(KVRem1, KVRem2, LI, SlotList, SlotCount);
|
||||||
_ ->
|
_ ->
|
||||||
merge_lists(KVRem1, KVRem2, LI, [Slot|SlotList], SlotCount + 1)
|
merge_lists(KVRem1, KVRem2, LI, [Slot|SlotList], SlotCount + 1)
|
||||||
|
@ -1346,6 +1346,18 @@ form_slot_test() ->
|
||||||
Slot),
|
Slot),
|
||||||
?assertMatch({[], [], {no_lookup, Slot}}, R1).
|
?assertMatch({[], [], {no_lookup, Slot}}, R1).
|
||||||
|
|
||||||
|
merge_tombstonelist_test() ->
|
||||||
|
% Merge lists wiht nothing but tombstones
|
||||||
|
SkippingKV1 = {{o, "B1", "K9995", null}, {9995, tomb, 1234567, {}}},
|
||||||
|
SkippingKV2 = {{o, "B1", "K9996", null}, {9996, tomb, 1234567, {}}},
|
||||||
|
SkippingKV3 = {{o, "B1", "K9997", null}, {9997, tomb, 1234567, {}}},
|
||||||
|
SkippingKV4 = {{o, "B1", "K9998", null}, {9998, tomb, 1234567, {}}},
|
||||||
|
SkippingKV5 = {{o, "B1", "K9999", null}, {9999, tomb, 1234567, {}}},
|
||||||
|
R = merge_lists([SkippingKV1, SkippingKV3, SkippingKV5],
|
||||||
|
[SkippingKV2, SkippingKV4],
|
||||||
|
{true, 9999999}),
|
||||||
|
?assertMatch({[], [], []}, R).
|
||||||
|
|
||||||
indexed_list_test() ->
|
indexed_list_test() ->
|
||||||
io:format(user, "~nIndexed list timing test:~n", []),
|
io:format(user, "~nIndexed list timing test:~n", []),
|
||||||
N = 150,
|
N = 150,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue