HADOOP-10630. Merge change r1599366 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1599369 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jing Zhao 2014-06-02 21:43:48 +00:00
parent 78d46e8508
commit adc4dc57c8
2 changed files with 3 additions and 2 deletions

View File

@ -174,6 +174,8 @@ Release 2.5.0 - UNRELEASED
HADOOP-10342. Add a new method to UGI to use a Kerberos login subject to
build a new UGI. (Larry McCay via omalley)
HADOOP-10630. Possible race condition in RetryInvocationHandler. (jing9)
Release 2.4.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -37,7 +37,6 @@ import org.apache.hadoop.ipc.ProtocolTranslator;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.RpcConstants;
import org.apache.hadoop.ipc.RpcInvocationHandler;
import org.apache.hadoop.util.ThreadUtil;
import com.google.common.annotations.VisibleForTesting;
@ -161,11 +160,11 @@ public class RetryInvocationHandler<T> implements RpcInvocationHandler {
if (invocationAttemptFailoverCount == proxyProviderFailoverCount) {
proxyProvider.performFailover(currentProxy.proxy);
proxyProviderFailoverCount++;
currentProxy = proxyProvider.getProxy();
} else {
LOG.warn("A failover has occurred since the start of this method"
+ " invocation attempt.");
}
currentProxy = proxyProvider.getProxy();
}
invocationFailoverCount++;
}