Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-1054

DefaultURLManager is not thread-safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.0
    • 0.14.0
    • Server
    • None

    Description

      org.apache.hadoop.gateway.ha.provider.impl.DefaultURLManager is not thread-safe.

      Currently, only the "write" methods are subject to locking. Apparently, there are some assumptions being made about the behavior of the underlying ConcurrentLinkedQueue.

      For instance, if a thread is preempted in setActiveURL(String), and another thread invokes getActiveURL(), the urls.peek() result could be incorrect.

      Attachments

        1. KNOX-1054.patch
          2 kB
          Philip Zampino

        Activity

          People

            pzampino Philip Zampino
            pzampino Philip Zampino
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: