Todd Lipcon has submitted this change and it was merged. Change subject: Add new ConnectToMaster RPC, implement client fallback ......................................................................
Add new ConnectToMaster RPC, implement client fallback This adds a new RPC to the master called 'ConnectToMaster', which the client uses when first connecting to the cluster. The client used to use GetMasterRegistration for this purpose, but that returned some unnecessary information, and was overloaded for multiple purposes. This purpose-built RPC will be more useful for piggy-backing cluster security properties, etc. As before, the client sends the RPC to all of the leaders in parallel, and believes any that says it is the leader. In order to preserve backwards compatibility, this introduces a new feature flag in the master protocol. The client sends the new RPC with the new feature flag, and if it sees that it was rejected, falls back to the old RPC. The code is somewhat ugly: as we've known for a while, the Rpc/RetriableRpc/RpcRetrier thing is due for a revamp. But, I didn't want to take on revamping it at this point. So, I hope you'll forgive the spaghetti. In addition to the included unit test, I also manually tested the fallback behavior using 'kudu table list' against an existing cluster running Kudu 1.2. Change-Id: I879801400ede4209679e6eb14eceb43775916c78 Reviewed-on: http://gerrit.cloudera.org:8080/5869 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/client/client-test.cc M src/kudu/client/master_rpc.cc M src/kudu/client/master_rpc.h M src/kudu/master/catalog_manager.cc M src/kudu/master/master.proto M src/kudu/master/master_service.cc M src/kudu/master/master_service.h M src/kudu/rpc/rpc_controller.cc M src/kudu/rpc/rpc_controller.h 9 files changed, 166 insertions(+), 52 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/5869 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I879801400ede4209679e6eb14eceb43775916c78 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]>
