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


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.

Reply via email to