Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16876 )
Change subject: rpc: fix non-retriable error when starting up or shutting down ...................................................................... rpc: fix non-retriable error when starting up or shutting down I found in testing a later patch that when a server is starting up or being destructed, we may run into non-retriable error messages like: Bad status: Remote error: Failed to write to server: ff6a8ff4d4bd456c99cc60b4ab35b6cc (127.0.0.1:60603): Service unavailable: service kudu.tserver.TabletServerAdminService not registered on TabletServer This is because during startup or destruction, there are points at which RPC services may not be registered, during which time RPCs will run into non-retriable errors like that posted. This patch addresses this by replacing the 'closing_' flag in rpc::Messenger with a state enum, allowing us to express windows during which the Messenger may not have all services registered. Change-Id: I04e2379de4cf632d257b93cd701d7c73cb2bbaed Reviewed-on: http://gerrit.cloudera.org:8080/16876 Tested-by: Kudu Jenkins Reviewed-by: Hao Hao <[email protected]> --- M src/kudu/client/client-test.cc M src/kudu/rpc/messenger.cc M src/kudu/rpc/messenger.h M src/kudu/rpc/rpc-test.cc M src/kudu/server/rpc_server.cc 5 files changed, 96 insertions(+), 11 deletions(-) Approvals: Kudu Jenkins: Verified Hao Hao: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/16876 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I04e2379de4cf632d257b93cd701d7c73cb2bbaed Gerrit-Change-Number: 16876 Gerrit-PatchSet: 5 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
