Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5246

PhoenixAccessControllers.getAccessControllers() method is not correctly implementing the double-checked locking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.14.0
    • 4.15.0, 5.1.0, 4.14.2
    • None

    Description

      By elserj on PHOENIX-5070:

      This looks to me that the getAccessControllers() method is not correctly implementing the double-checked locking "approach" as per https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java (the accessControllers variable must be volatile).

      If we want to avoid taking an explicit lock, what about using AtomicReference instead? Can we spin out another Jira issue to fix that?

      Attachments

        Issue Links

          Activity

            People

              swaroopa Swaroopa Kadam
              tdsilva Thomas D'Silva
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m