Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List-buckets/keys timeouts fail when unset #571

Closed
seancribbs opened this issue Jun 3, 2013 · 5 comments
Closed

List-buckets/keys timeouts fail when unset #571

seancribbs opened this issue Jun 3, 2013 · 5 comments

Comments

@seancribbs
Copy link
Contributor

When performing list-buckets or list-keys over PBC without the new timeout option set, the FSM bails with badarg trying to set an undefined timeout.

See http://giddyup.basho.com/#/projects/riak/scorecards/32/32-248-client_java_verify-centos-5-64/11206/artifacts/11177

cc @evanmcc

18:29:08.705 [info] com.basho.riak.pbc.RiakError: Error processing incoming message: error:{badmatch,
18:29:08.705 [info]                                           {error,
18:29:08.705 [info]                                            {badarg,
18:29:08.705 [info]                                             [{erlang,start_timer,
18:29:08.706 [info]                                               [undefined,<0.2488.0>,
18:29:08.706 [info]                                                {'$gen_timer',
18:29:08.706 [info]                                                 {timer_expired,undefined}}],
18:29:08.707 [info]                                               []},
18:29:08.707 [info]                                              {gen_fsm,start_timer,2,
18:29:08.707 [info]                                               [{file,"gen_fsm.erl"},
18:29:08.707 [info]                                                {line,253}]},
18:29:08.707 [info]                                              {riak_core_coverage_fsm,init,1,
18:29:08.707 [info]                                               [{file,
18:29:08.708 [info]                                                 "src/riak_core_coverage_fsm.erl"},
18:29:08.708 [info]                                                {line,162}]},
18:29:08.708 [info]                                              {gen_fsm,init_it,6,
18:29:08.709 [info]                                               [{file,"gen_fsm.erl"},
18:29:08.709 [info]                                                {line,361}]},
18:29:08.709 [info]                                              {proc_lib,init_p_do_apply,3,
18:29:08.709 [info]                                               [{file,"proc_lib.erl"},
18:29:08.709 [info]                                                {line,227}]}]}}}:[{riak_client,
18:29:08.710 [info]                                                                   list_buckets,
18:29:08.710 [info]                                                                   3,
18:29:08.710 [info]                                                                   [{file,
18:29:08.710 [info]                                                                     "src/riak_client.erl"},
18:29:08.710 [info]                                                                    {line,
18:29:08.710 [info]                                                                     456}]},
18:29:08.711 [info]                                                                  {riak_kv_pb_bucket,
18:29:08.711 [info]                                                                   process,2,
18:29:08.711 [info]                                                                   [{file,
18:29:08.711 [info]                                                                     "src/riak_kv_pb_bucket.erl"},
18:29:08.712 [info]                                                                    {line,81}]},
18:29:08.712 [info]                                                                  {riak_api_pb_server,
18:29:08.712 [info]                                                                   process_message,
18:29:08.712 [info]                                                                   4,
18:29:08.712 [info]                                                                   [{file,
18:29:08.712 [info]                                                                     "src/riak_api_pb_server.erl"},
18:29:08.712 [info]                                                                    {line,
18:29:08.713 [info]                                                                     223}]},
18:29:08.713 [info]                                                                  {riak_api_pb_server,
18:29:08.713 [info]                                                                   handle_message,
18:29:08.713 [info]                                                                   3,
18:29:08.713 [info]                                                                   [{file,
18:29:08.713 [info]                                                                     "src/riak_api_pb_server.erl"},
18:29:08.714 [info]                                                                    {line,
18:29:08.714 [info]                                                                     200}]},
18:29:08.714 [info]                                                                  {riak_api_pb_server,
18:29:08.714 [info]                                                                   decode_buffer,
18:29:08.714 [info]                                                                   1,
18:29:08.715 [info]                                                                   [{file,
18:29:08.715 [info]                                                                     "src/riak_api_pb_server.erl"},
18:29:08.715 [info]                                                                    {line,
18:29:08.716 [info]                                                                     172}]},
18:29:08.716 [info]                                                                  {gen_server,
18:29:08.716 [info]                                                                   handle_msg,
18:29:08.716 [info]                                                                   5,
18:29:08.716 [info]                                                                   [{file,
18:29:08.716 [info]                                                                     "gen_server.erl"},
18:29:08.717 [info]                                                                    {line,
18:29:08.717 [info]                                                                     607}]},
18:29:08.717 [info]                                                                  {proc_lib,
18:29:08.717 [info]                                                                   init_p_do_apply,
18:29:08.717 [info]                                                                   3,
18:29:08.717 [info]                                                                   [{file,
18:29:08.718 [info]                                                                     "proc_lib.erl"},
18:29:08.718 [info]                                                                    {line,
18:29:08.718 [info]                                                                     227}]}]
@jrwest
Copy link
Contributor

jrwest commented Jun 3, 2013

This sounds like an issue familiar to: basho/riak_core#330. maybe_start_timeout_timer probably needs to be extended to handle undefined cc/ @evanmcc

EDIT: this issue probably belongs in riak_core.

@evanmcc
Copy link
Contributor

evanmcc commented Jun 3, 2013

Yup. Will fix when I get in. Had a similar issue with http bit didn't think
to check pbc.

@evanmcc
Copy link
Contributor

evanmcc commented Jun 3, 2013

So, there's a lot of checks on the various paths into this particular
function (although clearly not enough of them). Since I am putting
the smarts now into the FSM, does it make sense to clean up the client
implementation by removing the checks?

@jrwest
Copy link
Contributor

jrwest commented Jun 3, 2013

if it also consolidates the checks so that they aren't duplicated across PB/HTTP, I'd say +1. Is it a lot of changes post-freeze though?

@evanmcc
Copy link
Contributor

evanmcc commented Jun 3, 2013

It's just a few case clauses to edit out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants