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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.14.0
    • Fix Version/s: 4.15.0, 5.1.0, 4.14.2
    • Component/s: None
    • Labels:

      Description

      By Josh Elser 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

              • Assignee:
                swaroopa Swaroopa Kadam
                Reporter:
                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