Skip to content

Late registration#2

Merged
rzezeski merged 3 commits into
masterfrom
sdc-late-registration
Jun 1, 2012
Merged

Late registration#2
rzezeski merged 3 commits into
masterfrom
sdc-late-registration

Conversation

@seancribbs

Copy link
Copy Markdown

Allow services that are registered after riak_api is started to get initialized on existing client connections. Since reltool doesn't guarantee any start order for applications in the rel (aside from declared dependencies), we need a way to "upgrade" existing connections that may have been established while an app that registers services is starting up.

This also fixes a dependency on lager in the .app file.

@rzezeski rzezeski mentioned this pull request May 30, 2012
@rzezeski

Copy link
Copy Markdown
Contributor

Besides the comments I made this looks good to me. I see lager warnings now when using old configs and no listener when missing configs. +1 to merge.

@ghost ghost assigned rzezeski May 30, 2012
@rzezeski

Copy link
Copy Markdown
Contributor

The tests are failing for me (even if I rebase against master). It seems the Encode:iolist is not a function. Kinda confused here.

terminal

pb_service_test:146: simple_test_...*failed*
::error:{badmatch,{error,closed}}
  in function pb_service_test:request/3
  in call from pb_service_test:'-simple_test_/0-fun-7-'/0


pb_service_test:148: simple_test_...*failed*
::error:{badmatch,{error,closed}}
  in function pb_service_test:request/3
  in call from pb_service_test:'-simple_test_/0-fun-9-'/0


pb_service_test:150: simple_test_...*failed*
::error:{badmatch,{error,closed}}
  in function pb_service_test:request/3
  in call from pb_service_test:'-simple_test_/0-fun-11-'/0

crash.log

2012-05-30 10:51:49 =ERROR REPORT====
** Generic server <0.195.0> terminating
** Last message in was {tcp,#Port<0.4786>,[105|<<>>]}
** When Server state == {state,#Port<0.4786>,undefined,{dict,13,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[[102|pb_service_test]],[[105|pb_service_test]],[[108|pb_service_test]],[],[[2|riak_api_basic_pb_service]],[[101|pb_service_test]],[[104|pb_service_test],[8|riak_api_basic_pb_service]],[[107|pb_service_test]],[],[[1|riak_api_basic_pb_service]],[],[[103|pb_service_test],[7|riak_api_basic_pb_service]],[[106|pb_service_test]],[[109|pb_service_test]]}}},{dict,2,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[[pb_service_test|undefined]],[[riak_api_basic_pb_service|undefined]],[],[],[],[],[],[],[],[],[],[]}}}}
** Reason for termination ==
** {'function not exported',[{riak_pb,iolist,[rpberrorresp,{rpberrorresp,<<"Error processing incoming message: error:undef">>,0}]},{riak_pb_codec,encode,1},{riak_api_pb_server,send_error,2},{riak_api_pb_server,handle_info,2},{gen_server,handle_msg,5},{proc_lib,init_p_do_apply,3}]}
2012-05-30 10:51:49 =CRASH REPORT====
  crasher:
    initial call: riak_api_pb_server:init/1
    pid: <0.195.0>
    registered_name: []
    exception exit: {undef,[{riak_pb,iolist,[rpberrorresp,{rpberrorresp,<<"Error processing incoming message: error:undef">>,0}]},{riak_pb_codec,encode,1},{riak_api_pb_server,send_error,2},{riak_api_pb_server,handle_info,2},{gen_server,handle_msg,5},{proc_lib,init_p_do_apply,3}]}
      in function  gen_server:terminate/6
      in call from proc_lib:init_p_do_apply/3
    ancestors: [riak_api_pb_sup,riak_api_sup,<0.181.0>]
    messages: []

@seancribbs

Copy link
Copy Markdown
Author

basho/riak_pb#3 needs to land for this to work, fixes a bug caused by API changes in basho/erlang_protobuffs when the upstream was merged.

@rzezeski

rzezeski commented Jun 1, 2012

Copy link
Copy Markdown
Contributor

This works with the referenced PR to riak_pb. +1 to merge

@rzezeski
rzezeski merged commit 5e97091 into master Jun 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants