Returning bucket when bucket is all
Need to know {Bucket, Key} not just Key if all buckets are being covered by nrt aae. So shoehorning this in - will also allow for proper use of FilterFun when filtering by partition.
This commit is contained in:
parent
b143ea1c08
commit
97fdd36d53
5 changed files with 70 additions and 19 deletions
|
@ -43,6 +43,7 @@
|
|||
find_journals/1,
|
||||
wait_for_compaction/1,
|
||||
foldkeysfun/3,
|
||||
foldkeysfun_returnbucket/3,
|
||||
sync_strategy/0]).
|
||||
|
||||
-define(RETURN_TERMS, {true, undefined}).
|
||||
|
@ -484,6 +485,11 @@ get_randomdate() ->
|
|||
|
||||
foldkeysfun(_Bucket, Item, Acc) -> Acc ++ [Item].
|
||||
|
||||
foldkeysfun_returnbucket(Bucket, {Term, Key}, Acc) ->
|
||||
Acc ++ [{Term, {Bucket, Key}}];
|
||||
foldkeysfun_returnbucket(Bucket, Key, Acc) ->
|
||||
Acc ++ [{Bucket, Key}].
|
||||
|
||||
check_indexed_objects(Book, B, KSpecL, V) ->
|
||||
% Check all objects match, return what should be the results of an all
|
||||
% index query
|
||||
|
|
|
@ -106,11 +106,11 @@ many_put_compare(_Config) ->
|
|||
|
||||
FoldKeysFun =
|
||||
fun(SegListToFind) ->
|
||||
fun(_B, K, Acc) ->
|
||||
fun(B, K, Acc) ->
|
||||
Seg = leveled_tictac:get_segment(K, SegmentCount),
|
||||
case lists:member(Seg, SegListToFind) of
|
||||
true ->
|
||||
[K|Acc];
|
||||
[{B, K}|Acc];
|
||||
false ->
|
||||
Acc
|
||||
end
|
||||
|
@ -586,7 +586,7 @@ recent_aae_allaae(_Config) ->
|
|||
IdxQ1 =
|
||||
{index_query,
|
||||
<<"$all">>,
|
||||
{fun testutil:foldkeysfun/3, []},
|
||||
{fun testutil:foldkeysfun_returnbucket/3, []},
|
||||
{IdxLMD,
|
||||
list_to_binary(TermPrefix ++ "."),
|
||||
list_to_binary(TermPrefix ++ "|")},
|
||||
|
@ -619,7 +619,7 @@ recent_aae_allaae(_Config) ->
|
|||
|
||||
true = length(DeltaX) == 0, % This hasn't seen any extra changes
|
||||
true = length(DeltaY) == 1, % This has seen an extra change
|
||||
[{_, K1}] = DeltaY,
|
||||
[{_, {B1, K1}}] = DeltaY,
|
||||
|
||||
ok = leveled_bookie:book_close(Book2A),
|
||||
ok = leveled_bookie:book_close(Book2B),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue