Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3160

Non-atomic operation on nodeUpdateQueue in RMNodeImpl

    XMLWordPrintableJSON

    Details

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

      Description

      RMNodeImpl.java
      while(nodeUpdateQueue.peek() != null){
        latestContainerInfoList.add(nodeUpdateQueue.poll());
      }
      

      The above code brings potential risk of adding null value to latestContainerInfoList. Since ConcurrentLinkedQueue implements a wait-free algorithm, we can directly poll the queue, before checking whether the value is null.

        Attachments

        1. YARN-3160.2.patch
          1 kB
          Chengbing Liu
        2. YARN-3160.patch
          1 kB
          Chengbing Liu

          Activity

            People

            • Assignee:
              chengbing.liu Chengbing Liu
              Reporter:
              chengbing.liu Chengbing Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: