Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11499

Check of executorThreadsStarted in ValueQueue#submitRefillTask() evades lock acquisition

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

          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;
            }
          }
      

      It is possible that two threads executing the above code both see executorThreadsStarted as being false, leading to executor.prestartAllCoreThreads() called twice.

        Attachments

          Activity

            People

            • Assignee:
              yuzhihong@gmail.com Ted Yu
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: