You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Anoop Sam John (JIRA)" <ji...@apache.org> on 2014/03/06 06:58:44 UTC

[jira] [Commented] (HBASE-10693) Correct declarations of Atomic* fields from 'volatile' to 'final'

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

Anoop Sam John commented on HBASE-10693:
----------------------------------------

LGTM.
Any other such cases in the code base? Good stuff.

> Correct declarations of Atomic* fields from 'volatile' to 'final'
> -----------------------------------------------------------------
>
>                 Key: HBASE-10693
>                 URL: https://issues.apache.org/jira/browse/HBASE-10693
>             Project: HBase
>          Issue Type: Improvement
>          Components: io, master
>            Reporter: Feng Honghua
>            Assignee: Feng Honghua
>            Priority: Minor
>         Attachments: HBASE-10693-trunk_v1.patch
>
>
> By checking the usage of these Atomic* fields, they themselves don't change once being assigned to referencing an Atomic* object, so 'final' rather than 'volatile' is more proper.
> On the other hand, the 'value' encapsulated in Atomic* is already declared 'volatile', which guarantees to perform correctly in multi-threads scenarios.



--
This message was sent by Atlassian JIRA
(v6.2#6252)