Hello Dan Burkert, Alexey Serbin,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/5869

to review the following change.

Change subject: WIP: Add new ConnectToMaster RPC, implement client fallback
......................................................................

WIP: 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.

WIP because I want to add some regression test coverage for the fallback
behavior. I did manually test that it works (using 'kudu table list'
against an existing cluster running Kudu 1.2). Before I bother adding
tests, looking for feedback on the approach.

Change-Id: I879801400ede4209679e6eb14eceb43775916c78
---
M src/kudu/client/master_rpc.cc
M src/kudu/client/master_rpc.h
M src/kudu/master/CMakeLists.txt
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, 143 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/69/5869/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5869
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I879801400ede4209679e6eb14eceb43775916c78
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>

Reply via email to