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

DataFileWriter.appendTo leads to intermittent IOException during write()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.3
    • java
    • None

    Description

      To append to a data file, we first open the file as RandomAccessFile in read-write mode, read some information such sync, seek to the end of the file and then use its FileDescriptor to create a FileOutputStream. Sharing a FileDescriptor this way could lead to problem if one of its containers is garbage-collected while the other is still in use. Please see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6322678. The bug got fixed in Java 7 (b06). In our case, RandomAccessFile sometimes gets garbage-collected leading to write errors. If the Java unit-tests are run multiple times, this occurs about 25% of the time on my Windows machine and about 50% on my Ubuntu Linux box.

      Attachments

        1. AVRO-524.patch
          1 kB
          Thiruvalluvan M. G.

        Activity

          People

            thiru_mg Thiruvalluvan M. G.
            thiru_mg Thiruvalluvan M. G.
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: