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

ReadOnly ByteBuffer serialization state changes after writing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.4
    • 1.7.7
    • None
    • None

    Description

      Using the GenericDatumWriter specifically, writing out an avro containing a read-only ByteBuffer changes state of the original object, making it unusable after the initial write. Potentially either the ByteBuffer needs to be copied prior to writing if read-only, or the offset needs to be reset after writing.

      I'll attach a simple test which shows the issue

      Attachments

        1. AVRO-1457.patch
          4 kB
          Rob Turner
        2. test.avdl
          0.3 kB
          GregWhitsitt
        3. ByteBufferTest.java
          3 kB
          GregWhitsitt

        Activity

          People

            robair Rob Turner
            gw4722 GregWhitsitt
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: