Wangda Tan created YARN-3440:

             Summary: ResourceUsage should be copy-on-write
                 Key: YARN-3440
             Project: Hadoop YARN
          Issue Type: Bug
          Components: resourcemanager, scheduler, yarn
            Reporter: Wangda Tan

In {{org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceUsage
}}, even if it is thread-safe, but Resource returned by getters could be 
updated by another thread.

All Resource objects in ResourceUsage should be copy-on-write, reader will 
always get a non-changed Resource. And changes apply on Resource acquired by 
caller will not affect original Resource.

This message was sent by Atlassian JIRA

Reply via email to