Handle mismatch on expanding pointer
Remove the nasty legacy of hard-coding for a scan width of 1
This commit is contained in:
parent
8f0bf8b892
commit
fb75a26497
1 changed files with 2 additions and 6 deletions
|
@ -911,11 +911,7 @@ maybe_expand_pointer(List) ->
|
||||||
List.
|
List.
|
||||||
|
|
||||||
|
|
||||||
expand_list_by_pointer({pointer, SSTPid, Slot, StartKey, EndKey}, Tail, 1) ->
|
expand_list_by_pointer({pointer, SSTPid, Slot, StartKey, EndKey}, Tail, Width) ->
|
||||||
AccPointers = [{pointer, Slot, StartKey, EndKey}],
|
|
||||||
ExpPointers = leveled_sst:sst_getslots(SSTPid, AccPointers),
|
|
||||||
lists:append(ExpPointers, Tail);
|
|
||||||
expand_list_by_pointer({pointer, SSTPid, Slot, StartKey, all}, Tail, Width) ->
|
|
||||||
FoldFun =
|
FoldFun =
|
||||||
fun(X, {Pointers, Remainder}) ->
|
fun(X, {Pointers, Remainder}) ->
|
||||||
case length(Pointers) of
|
case length(Pointers) of
|
||||||
|
@ -930,7 +926,7 @@ expand_list_by_pointer({pointer, SSTPid, Slot, StartKey, all}, Tail, Width) ->
|
||||||
{Pointers, Remainder ++ [X]}
|
{Pointers, Remainder ++ [X]}
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
InitAcc = {[{pointer, Slot, StartKey, all}], []},
|
InitAcc = {[{pointer, Slot, StartKey, EndKey}], []},
|
||||||
{AccPointers, AccTail} = lists:foldl(FoldFun, InitAcc, Tail),
|
{AccPointers, AccTail} = lists:foldl(FoldFun, InitAcc, Tail),
|
||||||
ExpPointers = leveled_sst:sst_getslots(SSTPid, AccPointers),
|
ExpPointers = leveled_sst:sst_getslots(SSTPid, AccPointers),
|
||||||
lists:append(ExpPointers, AccTail);
|
lists:append(ExpPointers, AccTail);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue