You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (Jira)" <ji...@apache.org> on 2021/01/21 13:37:00 UTC

[jira] [Resolved] (HADOOP-12593) multiple "volatile long" field declarations exist in the Hadoop codebase

     [ https://issues.apache.org/jira/browse/HADOOP-12593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Loughran resolved HADOOP-12593.
-------------------------------------
    Resolution: Invalid

> multiple "volatile long" field declarations exist in the Hadoop codebase
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-12593
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12593
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> If you get your IDE to scan for "volatile long", you find 20-30 entries. Volatile operations on `long` variables are not guaranteed to be atomic, so these usages can be vulnerable to race conditions generating invalid data.
> they need to be replaced by AtomicLong references, except in the specific case that you want performance values for statistics, and are prepared to take the risk



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

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