[ https://issues.apache.org/jira/browse/SENTRY-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dapeng Sun updated SENTRY-966: ------------------------------ Assignee: Colm O hEigeartaigh > 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 > Assignee: 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)