From 1acdec96cbafbc24613ca78452c8f5b074b7c1ff Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Tue, 5 Feb 2019 14:01:37 -0800 Subject: [PATCH] Revert "HBASE-21775 The BufferedMutator doesn't ever refresh region location cache Fix server location metadata refresh in multi-actions" This reverts commit 4e89d98d4adf24059a193efd3fb7f1143a936c90. Several unit tests are failing after this commit. --- .../java/org/apache/hadoop/hbase/client/AsyncProcess.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java index 5d8323ec745..4c571e48659 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java @@ -1256,7 +1256,7 @@ class AsyncProcess { Retry canRetry = errorsByServer.canRetryMore(numAttempt) ? Retry.YES : Retry.NO_RETRIES_EXHAUSTED; - if (ClientExceptionsUtil.isMetaClearingException(t)) { + if (tableName == null && ClientExceptionsUtil.isMetaClearingException(t)) { // tableName is null when we made a cross-table RPC call. connection.clearCaches(server); } @@ -1393,7 +1393,8 @@ class AsyncProcess { for (Map.Entry>> regionEntry : multiAction.actions.entrySet()) { byte[] regionName = regionEntry.getKey(); Throwable regionException = responses.getExceptions().get(regionName); - if (ClientExceptionsUtil.isMetaClearingException(regionException)) { + if (tableName == null && regionException != null && + ClientExceptionsUtil.isMetaClearingException(regionException)) { // 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 // for every possible exception that comes through, however.