You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2009/10/06 23:37:31 UTC
[jira] Commented: (AVRO-132) Fix multi-threading race condition
when threads share schema objects
[ https://issues.apache.org/jira/browse/AVRO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762792#action_12762792 ]
Doug Cutting commented on AVRO-132:
-----------------------------------
+1 This builds and passes tests for me on Ubuntu.
> Fix multi-threading race condition when threads share schema objects
> --------------------------------------------------------------------
>
> Key: AVRO-132
> URL: https://issues.apache.org/jira/browse/AVRO-132
> Project: Avro
> Issue Type: Bug
> Components: c++
> Reporter: Scott Banachowski
> Assignee: Scott Banachowski
> Attachments: AVRO-132.patch
>
>
> This bug was discovered when using the same avro schema object to decode many messages in parallel.
> A reference count used to manage the some pointers used by the schema was not atomic, so race conditions caused them to be decremented more than they were incremented (and thus, deleted).
> The solution is to use atomic counters for references, and by switching to boost::shared_ptr, we get this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.