Colm O hEigeartaigh created SENTRY-966:
------------------------------------------

             Summary: 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



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)

Reply via email to