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

Non-atomic operation on nodeUpdateQueue in RMNodeImpl

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 2.7.0
    • resourcemanager
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: