Andrew Wong has uploaded this change for review. ( 
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
---
M src/kudu/client/client-test.cc
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/server/rpc_server.cc
4 files changed, 81 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/76/16876/1
--
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: newchange
Gerrit-Change-Id: I04e2379de4cf632d257b93cd701d7c73cb2bbaed
Gerrit-Change-Number: 16876
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <[email protected]>

Reply via email to