Andrew Wong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/12002


Change subject: client: unify leader master retry logic
......................................................................

client: unify leader master retry logic

In preparation for implementing an asynchronous RPC that will need to
connect to the leader master, I've been looking through some of the
retry logic we have scattered around the C++ client. I noticed
near-identical code in a couple places (LookupRpc and
SyncLeaderMasterRpc), so I've ripped it out and put it in its own
reusable method.

The behavior is mostly the same as before with a few exceptions:
- RPC errors in that result in OK Statuses are evaluated up-front and a
  retry decision is based off of the error. It wasn't clear why this
  wasn't always the case before, since presumably we always want to
  handle RPC errors.
- GetTableLocations, on TimedOut error, will now retry for the
  single-master case.
- GetTableLocations, on ServiceUnavailable error, will not attempt to
  reconnect to the leader master, and instead, will simply retry.

Change-Id: I2450676da1c723a247c84deb1b895f116173670e
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-internal.h
M src/kudu/client/client-test.cc
M src/kudu/client/meta_cache.cc
4 files changed, 146 insertions(+), 118 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2450676da1c723a247c84deb1b895f116173670e
Gerrit-Change-Number: 12002
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>

Reply via email to