HBASE-21775 The BufferedMutator doesn't ever refresh region location cache Fix server location metadata refresh in multi-actions

This is a backport from branch-2 but we do not backport the test because
it uses branch-2-isms.

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Tommy Li 2019-01-24 15:37:49 -08:00 committed by stack
parent ff0e587b8f
commit 4e89d98d4a
1 changed files with 2 additions and 3 deletions

View File

@ -1256,7 +1256,7 @@ class AsyncProcess {
Retry canRetry = errorsByServer.canRetryMore(numAttempt) Retry canRetry = errorsByServer.canRetryMore(numAttempt)
? Retry.YES : Retry.NO_RETRIES_EXHAUSTED; ? Retry.YES : Retry.NO_RETRIES_EXHAUSTED;
if (tableName == null && ClientExceptionsUtil.isMetaClearingException(t)) { if (ClientExceptionsUtil.isMetaClearingException(t)) {
// tableName is null when we made a cross-table RPC call. // tableName is null when we made a cross-table RPC call.
connection.clearCaches(server); connection.clearCaches(server);
} }
@ -1393,8 +1393,7 @@ class AsyncProcess {
for (Map.Entry<byte[], List<Action<Row>>> regionEntry : multiAction.actions.entrySet()) { for (Map.Entry<byte[], List<Action<Row>>> regionEntry : multiAction.actions.entrySet()) {
byte[] regionName = regionEntry.getKey(); byte[] regionName = regionEntry.getKey();
Throwable regionException = responses.getExceptions().get(regionName); Throwable regionException = responses.getExceptions().get(regionName);
if (tableName == null && regionException != null && if (ClientExceptionsUtil.isMetaClearingException(regionException)) {
ClientExceptionsUtil.isMetaClearingException(regionException)) {
// For multi-actions, we don't have a table name, but we want to make sure to clear the // For multi-actions, we don't have a table name, but we want to make sure to clear the
// cache in case there were location-related exceptions. We don't to clear the cache // cache in case there were location-related exceptions. We don't to clear the cache
// for every possible exception that comes through, however. // for every possible exception that comes through, however.