riak-erlang-client issue with Riak EE 1.2

Julian jpellico at gmail.com
Thu Aug 16 18:51:38 EDT 2012


Hi,

Recently, we upgraded our Riak cluster to 1.2. I hear that one of our
buckets has been wiped and reloaded, but our index (Riak search is enabled)
may not be in a consistent state. This has led to an error in code using
riak-erlang-client 1.2, shown below.

One of the intriguing things I find is that the exception is listed as
occuring in one of my own processes that is doing json decoding, however I
have checked the json by saving it to a file and it does not contain the
data shown inside the 'struct' in the exception. The only explanation I can
come up with is that the badmatch is occurring within riakc_pb socket and
was triggered by my call to riakc_pb_socket:search/6, and the process link
is somehow influencing the crash report.

1. Is there a newer version of riak-erlang-client that might fix the issue?
I noticed that though labeled v1.2, it came out in April; has there been a
client code update for EE 1.2?
2. Would it help make my code more robust if I tried to filter out these
not_found's so it wouldn't reach the client? As in *
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2012-January/007075.html
*


(module names edited slightly)

=CRASH REPORT==== 16-Aug-2012::21:44:52 ===
  crasher:
    initial call: xx_acl_query:init/1
    pid: <0.159.0>
    registered_name: []
    exception exit: {{badmatch,
                         {not_found,

{<<"a65796222ea26bb7b355bf140dbd5b72e81efee1">>,
                              <<"000018e5-accf-fff1-8123-1efee1">>},
                             {struct,
                                 [{p,[0]},
                                  {<<"account_id">>,[<<"0000005427">>]},
                                  {<<"account_type_id">>,[<<"3">>]},
                                  {<<"id">>,[<<"6373">>]},
                                  {<<"status">>,[<<"Deleted">>]},
                                  {<<"type">>,[<<"account">>]},
                                  {score,[1.0]}]}}},
                     [{mochijson2,tokenize,2},
                      {mochijson2,decode1,2},
                      {mochijson2,json_decode,2},
                      {lists,map,2},
                      {lists,map,2},
                      {xx_acl_tree,from_json,2},
                      {xx_acl_query,load_instance_,2},
                      {xx_acl_query,bootstrap_accounts,1}]}
      in function  gen_server:init_it/6
    ancestors: [xx_cache_sup,xx_acl_sup,<0.108.0>]
    messages: []
    links: [<0.132.0>]
    dictionary: [<omitted>]
    trap_exit: true
    status: running
    heap_size: 832040
    stack_size: 24
    reductions: 30690459
  neighbours:


Cheers,
Julian Pellico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120816/b66ebdc3/attachment.html>


More information about the riak-users mailing list