HADOOP-11499. Check of executorThreadsStarted in ValueQueue#submitRefillTask() evades lock acquisition. Contributed by Ted Yu
This commit is contained in:
parent
56b7ec71a6
commit
7574df1bba
@ -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
|
||||
|
@ -308,6 +308,7 @@ public class ValueQueue <E> {
|
||||
final Queue<E> keyQueue) throws InterruptedException {
|
||||
if (!executorThreadsStarted) {
|
||||
synchronized (this) {
|
||||
if (!executorThreadsStarted) {
|
||||
// To ensure all requests are first queued, make coreThreads =
|
||||
// maxThreads
|
||||
// and pre-start all the Core Threads.
|
||||
@ -315,6 +316,7 @@ public class ValueQueue <E> {
|
||||
executorThreadsStarted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// The submit/execute method of the ThreadPoolExecutor is bypassed and
|
||||
// the Runnable is directly put in the backing BlockingQueue so that we
|
||||
// can control exactly how the runnable is inserted into the queue.
|
||||
|
Loading…
x
Reference in New Issue
Block a user