Avro
  1. Avro
  2. AVRO-607

SpecificData.getSchema not thread-safe

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.3
    • Fix Version/s: None
    • Component/s: java
    • Labels:
      None

      Description

      SpecificData.getSchema uses a WeakHashMap to cache schemas, but WeakHashMap is not thread-safe, and the method itself is not synchronized. Seems like this could lead to the data structure getting corrupted.

      1. AVRO-607.patch
        0.9 kB
        Doug Cutting

        Issue Links

          Activity

          Stephen Tu created issue -
          Doug Cutting made changes -
          Field Original Value New Value
          Attachment AVRO-607.patch [ 12451382 ]
          Dave Latham made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Ryan Blue made changes -
          Remote Link This issue links to "AVRO-607.patch (Web Link)" [ 24565 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Stephen Tu
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development