From adc4dc57c8ca47e373ceff966e6f0219eeb1fa7d Mon Sep 17 00:00:00 2001 From: Jing Zhao Date: Mon, 2 Jun 2014 21:43:48 +0000 Subject: [PATCH] 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 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../org/apache/hadoop/io/retry/RetryInvocationHandler.java | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 97e6bd50e79..2b018e5a406 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -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 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java index 0d342194668..4df44f6dc6a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java @@ -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 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++; }