Avro
  1. Avro
  2. AVRO-607

SpecificData.getSchema not thread-safe

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • 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

        Activity

        Stephen Tu created issue -
        Doug Cutting made changes -
        Field Original Value New Value
        Attachment AVRO-607.patch [ 12451382 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Stephen Tu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development