Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-820

Java: Exceptions thrown while encoding a record while writing an Avro Data file will produce a corrupt file.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4.1, 1.5.0, 1.5.1
    • 1.5.2
    • java
    • None
    • Reviewed

    Description

      If an exception is thrown while serializing a record in DataFileWriter<D>.append(D) partial contents of that serialization will end up in the file. This corrupts the block.

      DataFileWriter should ensure that the buffer is rewound to the state prior to the record write in the case of an exception thrown during serialization to prevent creating a corrupt file.

      Attachments

        1. AVRO-820.patch
          4 kB
          Doug Cutting
        2. AVRO-820.patch
          3 kB
          Scott Carey

        Activity

          People

            scott_carey Scott Carey
            scott_carey Scott Carey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: