Dangling keys/objects after a batch of sequential inserts (for going on 3 days)

Siraaj Khandkar siraaj at khandkar.net
Sun Jul 21 14:56:29 EDT 2013


On 07/21/2013 02:42 PM, Siraaj Khandkar wrote:
> 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 <siraaj at khandkar.net> wrote:

<snipped>

>> 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),

Err. Copy-n-paste error. This should, of course, be:

I = "bucket",
{ok, {keys, L1}}=riakc_pb_socket:get_index(PID, B, {binary_index, I}, B)
{ok, {keys, L2}}=riakc_pb_socket:get_index(PID, B, {binary_index, I}, B)

In the real code I'm actually calling a wrapper function that matches on 
{ok, {keys, Keys}}.




>>          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.=




More information about the riak-users mailing list