You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2015/11/19 13:42:11 UTC

[jira] [Updated] (SENTRY-966) SqoopAuthBindingSingleton uses bad double check locking idiom

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

Colm O hEigeartaigh updated SENTRY-966:
---------------------------------------
    Attachment: SENTRY-966.patch

> SqoopAuthBindingSingleton uses bad double check locking idiom
> -------------------------------------------------------------
>
>                 Key: SENTRY-966
>                 URL: https://issues.apache.org/jira/browse/SENTRY-966
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sqoop plugin
>            Reporter: Colm O hEigeartaigh
>             Fix For: 1.7.0
>
>         Attachments: SENTRY-966.patch
>
>
> The SqoopAuthBindingSingleton uses the bad double check locking idiom:
> http://www.javaworld.com/article/2074979/java-concurrency/double-checked-locking--clever--but-broken.html
> An easy solution is just to make the variable volatile, but a much better approach is to use the Lazy init holder class idiom, which avoid synchronization altogether.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)