Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10953

NetworkTopology#add calls NetworkTopology#toString without holding the netlock

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.7.0
    • Component/s: net
    • Labels:
      None
    • Target Version/s:

      Description

      Found this issue while reading the related code. In NetworkTopology.toString() method, there is no thread safety guarantee directly, it's called by add/remove, and inside add/remove, most of this.toString() calls are protected by rwlock, except a couple of error handling codes, one possible fix is that moving them into lock as well, due to not heavy operations, so no obvious downgration should be observed per my current knowledge.

        Attachments

        1. HADOOP-10953.txt
          1 kB
          Liang Xie

          Issue Links

            Activity

              People

              • Assignee:
                xieliang007 Liang Xie
                Reporter:
                xieliang007 Liang Xie
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: