Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-3774

Remove double-checked Locking in New Client Protocol code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • client/server
    • None

    Description

      ServerConnectionFactory uses double-checked locking for loading the services it depends on. This idiom is fundamentally broken.

      Even marking the field that's locked this way volatile may not resolve the issue, as the object itself could be read as uninitialized even if the field (reference) isn't. I don't really know the JMM well enough to be sure that it's broken, but that's a good sign that we shouldn't do it unless we really need to for performance reasons (and even then...)

      This may be best to resolve after GEODE-3751 and GEODE-3739 due to the changes to loading those refactors will bring.

      While we're at it, we should assert that there is only one client protocol service, because we can't handle two and which one we choose is undefined.

      Attachments

        Activity

          People

            ukohlmeyer Udo Kohlmeyer
            gosullivan Galen O'Sullivan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: