PB Service Broken #118

Closed
andrewzeneski opened this Issue Jun 29, 2012 · 1 comment

3 participants

@andrewzeneski
  1. I install the precommit hook on my test bucket (bin/search-cmd install test)
  2. I create a JSON object that looks like this {"name": "Andrew Z"} and store it in Riak (using my API and the key "1000")
  3. I create a RpbSearchQueryReq message, set ONLY the index to 'test' and the query (q) to "name:Andrew*"
  4. Send the message w/ the message type 27 to PBC port and receive back RpbErrorResp with the error code 0 and the message:

0: Error processing incoming message: error:badarg:[{erlang,list_to_float,
[["0.00000",101,43,48]]},
{riak_search_utils,to_float,
1},
{riak_search_pb_query,
encode_results,3},
{riak_search_pb_query,
process,2},
{riak_api_pb_server,
process_message,4},
{riak_api_pb_server,
handle_info,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]

From the command line I get:
$ bin/search-cmd search-doc test 'name:Andrew*'

:: Searching for 'name:Andrew*' / '' in test...


index/id: test/1000
<<"name">> => <<"Andrew Z">>


:: Found 1 results.
:: Maximum score ["0.00000",101,43,48]

I noticed that the max score look exactly like the value in the error message.

error.log shows the following for that PBC request:

2012-06-29 14:03:26.916 [error] <0.17489.5> gen_server <0.17489.5> terminated with reason: {error,badarg,[{erlang,list_to_float,[["0.00000",101,43,48]]},{riak_search_utils,to_float,1},{riak_search_pb_query,encode_results,3},{riak_search_pb_query,process,2},{riak_api_pb_server,process_message,4},{riak_api_pb_server,handle_info,2},{gen_server,handle_msg,5},{proc_lib,init_p_do_apply,3}]}

2012-06-29 14:03:26.920 [error] <0.17489.5> CRASH REPORT Process <0.17489.5> with 0 neighbours exited with reason: {error,badarg,[{erlang,list_to_float,[["0.00000",101,43,48]]},{riak_search_utils,to_float,1},{riak_search_pb_query,encode_results,3},{riak_search_pb_query,process,2},{riak_api_pb_server,process_message,4},{riak_api_pb_server,handle_info,2},{gen_server,handle_msg,5},{proc_lib,init_p_do_apply,3}]} in gen_server:terminate/6

2012-06-29 14:03:26.923 [error] <0.62.0> Supervisor riak_api_pb_sup had child undefined started with {riak_api_pb_server,start_link,undefined} at <0.17489.5> exit with reason {error,badarg,[{erlang,list_to_float,[["0.00000",101,43,48]]},{riak_search_utils,to_float,1},{riak_search_pb_query,encode_results,3},{riak_search_pb_query,process,2},{riak_api_pb_server,process_message,4},{riak_api_pb_server,handle_info,2},{gen_server,handle_msg,5},{proc_lib,init_p_do_apply,3}]} in context child_terminated

@seancribbs seancribbs was assigned Jun 29, 2012
@seancribbs

I have confirmed this happens on an updated local version of the Ruby client as well. Since I compiled with R15B01, I get line numbers too:


Error processing incoming message: error:badarg:[{erlang,list_to_float,
                                                  [["0.00000",101,43,48]],
                                                  []},
                                                 {riak_search_utils,to_float,
                                                  1,
                                                  [{file,
                                                    "src/riak_search_utils.erl"},
                                                   {line,101}]},
                                                 {riak_search_pb_query,
                                                  encode_results,3,
                                                  [{file,
                                                    "src/riak_search_pb_query.erl"},
                                                   {line,113}]},
                                                 {riak_search_pb_query,
                                                  process,2,
                                                  [{file,
                                                    "src/riak_search_pb_query.erl"},
                                                   {line,81}]},
                                                 {riak_api_pb_server,
                                                  process_message,4,
                                                  [{file,
                                                    "src/riak_api_pb_server.erl"},
                                                   {line,205}]},
                                                 {riak_api_pb_server,
                                                  handle_info,2,
                                                  [{file,
                                                    "src/riak_api_pb_server.erl"},
                                                   {line,124}]},
                                                 {gen_server,handle_msg,5,
                                                  [{file,"gen_server.erl"},
                                                   {line,607}]},
                                                 {proc_lib,init_p_do_apply,3,
                                                  [{file,"proc_lib.erl"},
                                                   {line,227}]}]

I will make a fix shortly.

@seancribbs seancribbs removed their assignment May 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment