[
https://issues.apache.org/jira/browse/GIRAPH-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13749159#comment-13749159
]
Chuan Lei commented on GIRAPH-730:
----------------------------------
Hi Eli,
Thanks for your feedbacks. There could be two problems when 2 threads call the
getTaskResourceMap method.
1. Two threads find that the LOCAL_RESOURCES is null, thus both of them try to
initialize/compose it.
2. One thread (T1) finds that the LOCAL_RESOURCES is null, and starts
initializing it. The other thread (T2) finds the LOCAL_RESOURCES is not null
(being initialized), and then directly returns the LOCAL_RESOURCES, which has
not been completely initialized by T1 yet.
Both cases above may cause the inconsistent state.
Synchronizing the block is fine. I will change it and resubmit a path shortly.
> GiraphApplicationMaster race condition in resource loading
> ----------------------------------------------------------
>
> Key: GIRAPH-730
> URL: https://issues.apache.org/jira/browse/GIRAPH-730
> Project: Giraph
> Issue Type: Bug
> Affects Versions: 1.0.0
> Environment: Giraph with Yarn
> Reporter: Chuan Lei
> Assignee: Chuan Lei
> Attachments: GIRAPH-730.v1.patch
>
>
> In GiraphApplicationMaster.java, getTaskResourceMap function is not
> multi-thread safe, which causes the application master fail to distribute the
> resources (jar, configuration file, etc.) to each container.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira