HADOOP-10630. Possible race condition in RetryInvocationHandler. Contributed by Jing Zhao.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1599366 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5bbc484393
commit
cf03bdc3fc
@ -527,6 +527,8 @@ Release 2.5.0 - UNRELEASED
|
|||||||
HADOOP-10638. Updating hadoop-daemon.sh to work as expected when nfs is
|
HADOOP-10638. Updating hadoop-daemon.sh to work as expected when nfs is
|
||||||
started as a privileged user. (Manikandan Narayanaswamy via atm)
|
started as a privileged user. (Manikandan Narayanaswamy via atm)
|
||||||
|
|
||||||
|
HADOOP-10630. Possible race condition in RetryInvocationHandler. (jing9)
|
||||||
|
|
||||||
Release 2.4.1 - UNRELEASED
|
Release 2.4.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
import org.apache.hadoop.ipc.RPC;
|
import org.apache.hadoop.ipc.RPC;
|
||||||
import org.apache.hadoop.ipc.RpcConstants;
|
import org.apache.hadoop.ipc.RpcConstants;
|
||||||
import org.apache.hadoop.ipc.RpcInvocationHandler;
|
import org.apache.hadoop.ipc.RpcInvocationHandler;
|
||||||
import org.apache.hadoop.util.ThreadUtil;
|
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
@ -160,11 +159,11 @@ public Object invoke(Object proxy, Method method, Object[] args)
|
|||||||
if (invocationAttemptFailoverCount == proxyProviderFailoverCount) {
|
if (invocationAttemptFailoverCount == proxyProviderFailoverCount) {
|
||||||
proxyProvider.performFailover(currentProxy.proxy);
|
proxyProvider.performFailover(currentProxy.proxy);
|
||||||
proxyProviderFailoverCount++;
|
proxyProviderFailoverCount++;
|
||||||
currentProxy = proxyProvider.getProxy();
|
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("A failover has occurred since the start of this method"
|
LOG.warn("A failover has occurred since the start of this method"
|
||||||
+ " invocation attempt.");
|
+ " invocation attempt.");
|
||||||
}
|
}
|
||||||
|
currentProxy = proxyProvider.getProxy();
|
||||||
}
|
}
|
||||||
invocationFailoverCount++;
|
invocationFailoverCount++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user