[
https://issues.apache.org/jira/browse/AVRO-1101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396553#comment-13396553
]
Lucas Martin-King commented on AVRO-1101:
-----------------------------------------
My colleague (Michael Cooper) and I have contributed some code to the Avro-C
libraries.
We would prefer the current method, (which seems to be more efficient), as we
are reading and writing huge amounts of data with Avro. We often encounter
segfaults by our own making during *testing* but these are definitely worth the
performance benefits.
For example, in the case of reading we currently use Avro roughly as follows:
<create the interface from the reader schema>
<create a generic value from the interface>
<load the field indexes from the generic value>
<decref the generic value>
Then for each Avro record in a data file:
<read the record value>
<read each field by index>
<reset the value>
And in the case of writing:
<create the avro schema from json>
<open file writer with schema and codec>
<create the interface from the schema>
<load the field indexes>
<create a value "prototype" - we set a lot of fields to null>
Then writing lots of records:
<create a generic value from the writer schema>
<copy the value prototype, ie: avro_value_copy_fast>
<fill in the values which we need to set>
<append the value to the writer>
<decref>
What we would like to see is some more in depth documentation as we currently
use the tests as our reference :-)
> avro-c: reference counting error in avro_schema_record_field_get() and friends
> ------------------------------------------------------------------------------
>
> Key: AVRO-1101
> URL: https://issues.apache.org/jira/browse/AVRO-1101
> Project: Avro
> Issue Type: Bug
> Components: c
> Affects Versions: 1.6.3, 1.7.0
> Reporter: Pugachev Maxim
> Priority: Critical
> Attachments: AVRO-1101.patch, example3.c
>
>
> There is a couple of reference counting errors in avro-c which can produce
> crash bugs. Attached example shows this problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira