<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -52,4 +52,8 @@ Advanced usage is enabled through a set of options.  Here they are:
   acts_as_referenced # Defaults to 'reference'
   acts_as_referenced :referenced_column =&gt; &quot;order_number&quot;
   
+== A Note on Racing
+
+There's a racing condition inherent in the plugin as it is shipped.  If there are two processes creating references at approximately the same time, it is entirely possible that they will collide and create reference numbers at the same time.  Rails may or may not catch this, so the possibility for duplicate reference numbers exists, and the possibility for confusing end-user errors is even greater.  To solve this, you have to lock the table from reads while creating a reference number.  It should only take &lt; 50ms, so in most cases it is not that big of a deal.  The locking procedures are different for different DBMSs.  For PostgreSQL, uncomment lib/acts_as_referenced.rb line #91.  For MySQL, uncomment lib/acts_as_referenced.rb lines #93 and #99.  For other systems, simply write your own table locking/unlocking SQL and place it in the same spots.
+  
 Copyright (c) 2008 Erik Peterson, released under the MIT license
\ No newline at end of file</diff>
      <filename>README.rdoc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>57b34e3d5f1ff420048268ac628d453acc643c0d</id>
    </parent>
  </parents>
  <author>
    <name>Erik Peterson</name>
    <email>erik@ep.local</email>
  </author>
  <url>http://github.com/subwindow/acts_as_referenced/commit/2d5ff2fec4974deee30af92a672d264b2bd68fee</url>
  <id>2d5ff2fec4974deee30af92a672d264b2bd68fee</id>
  <committed-date>2008-07-22T19:01:48-07:00</committed-date>
  <authored-date>2008-07-22T19:01:48-07:00</authored-date>
  <message>Added note on racing</message>
  <tree>bfcc1f930b29a25e2f0edf5e7c97c71d3447175f</tree>
  <committer>
    <name>Erik Peterson</name>
    <email>erik@ep.local</email>
  </committer>
</commit>
