hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [43/50] [abbrv] hadoop git commit: HADOOP-11499. Check of executorThreadsStarted in ValueQueue#submitRefillTask() evades lock acquisition. Contributed by Ted Yu
Date Tue, 27 Jan 2015 18:41:01 GMT
HADOOP-11499. Check of executorThreadsStarted in ValueQueue#submitRefillTask() evades lock
acquisition. Contributed by Ted Yu


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7574df1b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7574df1b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7574df1b

Branch: refs/heads/YARN-2928
Commit: 7574df1bba33919348d3009f2578d6a81b5818e6
Parents: 56b7ec7
Author: Jason Lowe <jlowe@apache.org>
Authored: Mon Jan 26 16:56:14 2015 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Mon Jan 26 16:56:14 2015 +0000

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt         |  3 +++
 .../org/apache/hadoop/crypto/key/kms/ValueQueue.java    | 12 +++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7574df1b/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 662f580..598f750 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -764,6 +764,9 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11482. Use correct UGI when KMSClientProvider is called by a proxy
     user. Contributed by Arun Suresh.
 
+    HADOOP-11499. Check of executorThreadsStarted in
+    ValueQueue#submitRefillTask() evades lock acquisition (Ted Yu via jlowe)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7574df1b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java
index 8e67ecc..32451d8 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java
@@ -308,11 +308,13 @@ public class ValueQueue <E> {
       final Queue<E> keyQueue) throws InterruptedException {
     if (!executorThreadsStarted) {
       synchronized (this) {
-        // To ensure all requests are first queued, make coreThreads =
-        // maxThreads
-        // and pre-start all the Core Threads.
-        executor.prestartAllCoreThreads();
-        executorThreadsStarted = true;
+        if (!executorThreadsStarted) {
+          // To ensure all requests are first queued, make coreThreads =
+          // maxThreads
+          // and pre-start all the Core Threads.
+          executor.prestartAllCoreThreads();
+          executorThreadsStarted = true;
+        }
       }
     }
     // The submit/execute method of the ThreadPoolExecutor is bypassed and


Mime
View raw message