On 07/21/2013 02:20 PM, Siraaj Khandkar wrote:
On 07/21/2013 07:24 AM, Russell Brown wrote:> Hi,
>
> On 21 Jul 2013, at 02:09, Siraaj Khandkar <[email protected]> wrote:
>
<snipped>
> Can you provide an example of the 2i queries you're running?
This is how I am testing it:
Compare = fun(PID, Bucket) ->
B = Bucket,
L1 = riakc_pb_socket:get_index(PID, B, {binary_index,
"bucket"}, B),
L2 = riakc_pb_socket:get_index(PID, B, {binary_index,
"bucket"}, B),
io:format("L1: ~b, L2: ~b~n",[length(L1), length(L2)]),
Diff_L1_L2 = L1 -- L2,
Diff_L2_L1 = L2 -- L1,
io:format("=== L1 -- L2 ===~n~p~n~n", [Diff_L1_L2]),
io:format("=== L2 -- L1 ===~n~p~n~n", [Diff_L2_L1]),
Fetch = fun(Key) ->
case riakc_pb_socket:get(PID, B, Key) of
{ok, _} -> io:format("FOUND: ~p~n", [Key]);
{error, _} -> io:format("NOT FOUND: ~p~n", [Key])
end
end,
io:format("=== L1 -- L2 ===~n"),
lists:foreach(Fetch, Diff_L1_L2),
io:format("=== L2 -- L1 ===~n"),
lists:foreach(Fetch, Diff_L2_L1)
end.
Which results in differences _sometimes_, but _always_ fails on get.
UPDATE:
I just re-ran the test about ~10 more times (~12 hours after the last
series of tests) and the lists of keys returned by 2i are now always
consistent.
However, a separate test that tries to GET the keys from the original
set reveals 7 that a consistently missing.
So, I still have a problem, just a slightly less puzzling one.
I _could_ just re-insert the missing ones, but I would like to
understand what went wrong before doing so.
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com