Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-189

Java Synchronization issues in URLSchemaContextResolver

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 1198

    Description

      There are some synchronization issues in the URLSchemaContextResolver class, specifically visibility issues. Specifically:

      The currentSchemaContext variable in this class is not thread safe. The "tryToUpdateSchemaContext" method is synchronized, but other places where we read the variable are not synchronized. This leads to "visibility" issues where an update to the variable may not be immediately visible in other threads.

      To fix this, we need to either make the variable currentSchemaContext volatile, or ensure that all access to it is synchronized. This can lead to indeterminate behavior.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tolvecky@cisco.com Tomas Olvecky
            devin.avery@brocade.com Devin Avery
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: