Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-966

SqoopAuthBindingSingleton uses bad double check locking idiom

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • Sqoop plugin
    • None
    • Patch

    Description

      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.

      Attachments

        1. SENTRY-966.patch
          2 kB
          Colm O hEigeartaigh

        Activity

          People

            coheigea Colm O hEigeartaigh
            coheigea Colm O hEigeartaigh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: