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

The values of a map are not correct

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.7.4
    • None
    • c
    • None
    • Ubuntu 12.10

    Description

      When I put values into a map, the values appear delayed with one cycle:

      // pseudo code
      map = Map()
      for (i = 0; i < 5; i++) {
      map.put(i, i)
      }

      // then map contains the following elements:

      {"0": "1", "1": "2", "2": "3", "3": "4", "4": ""}

      I wrote a sample code, which demonstrates the bug. I hope I'm not wrong. I have also problems with the reference counting: if I comment out the free() calls in the program, I get glibc errors. Is it possible, that the Avro frees not just its own pointers in the *decref() calls?

      Attachments

        1. main.c
          3 kB
          Tibor Benke
        2. main-fixed.c
          3 kB
          Douglas Creager

        Activity

          People

            Unassigned Unassigned
            btibi Tibor Benke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: