You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Benjamin Teke (Jira)" <ji...@apache.org> on 2020/06/02 16:47:00 UTC

[jira] [Commented] (YARN-10296) Make ContainerPBImpl#getId/setId synchronized

    [ https://issues.apache.org/jira/browse/YARN-10296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124042#comment-17124042 ] 

Benjamin Teke commented on YARN-10296:
--------------------------------------

Hi [~leftnoteasy],

I wanted to ask your opinion on this task. Making the getId/setId synchronized triggers the findBugs issue: IS2_INCONSISTENT_SYNC. It is valid based on the code, as the class's other methods do access the containerId with no synchronisation. Is it worth the extra effort to refactor those methods? I'm having concerns about performance.

Thanks!

> Make ContainerPBImpl#getId/setId synchronized
> ---------------------------------------------
>
>                 Key: YARN-10296
>                 URL: https://issues.apache.org/jira/browse/YARN-10296
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.3.0
>            Reporter: Benjamin Teke
>            Assignee: Benjamin Teke
>            Priority: Minor
>         Attachments: YARN-10296.001.patch
>
>
> ContainerPBImpl getId and setId methods can be accessed from multiple threads. In order to avoid any simultaneous accesses and race conditions these methods should be synchronized.
> The idea came from the issue described in YARN-10295, however that patch is only applicable to branch-3.2 and 3.1.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org