You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Stig Rohde Døssing (JIRA)" <ji...@apache.org> on 2017/09/21 16:12:00 UTC

[jira] [Assigned] (STORM-2750) fix double_checked locking

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

Stig Rohde Døssing reassigned STORM-2750:
-----------------------------------------

    Assignee: Huaiyong Fu

> fix double_checked locking
> --------------------------
>
>                 Key: STORM-2750
>                 URL: https://issues.apache.org/jira/browse/STORM-2750
>             Project: Apache Storm
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Huaiyong Fu
>            Assignee: Huaiyong Fu
>              Labels: pull-request-available
>
> update HBaseSecurityUtil singleton to fix double_checked locking
> Double-Checked Locking is widely cited and used as an efficient method for implementing lazy initialization in a multithreaded environment.
> Unfortunately, it will not work reliably in a platform independent way when implemented in Java, without additional synchronization. When implemented in other languages, such as C++, it depends on the memory model of the processor, the reorderings performed by the compiler and the interaction between the compiler and the synchronization library. Since none of these are specified in a language such as C++, little can be said about the situations in which it will work. Explicit memory barriers can be used to make it work in C++, but these barriers are not available in Java.
> See url link for details: http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)