On Mon, Apr 20, 2009 at 3:02 PM, Matt S Trout <[email protected]> wrote:
> On Sun, Apr 19, 2009 at 11:49:29AM +0100, Peter Corlett wrote:
>> On 19 Apr 2009, at 11:14, Matt S Trout wrote:
>> >Valid idea though, and something we should look at making a
>> >capability in
>> >storage for 09 - in the meantime I'd recommend rewriting it as a
>> >reusltset
>> >component just as people already suggested, repeatedly.
>>
>> The word "component" wasn't used at all in the thread before I went
>> off and wrote some code.
>
> Well, it has been now. HTH, HAND.
>
>> I'd argue that DBIx::Class should actually be race-free out of the box
>> rather than require an obscure component to get such behaviour, but
>> I'll go off and rewrite it as a component instead.
>
> I agree, but there's a fair chunk of refactoring to do it properly, so I'd
> rather wait until we do that - better to have a known bug than be stuck with

It is worth noting that it is not exactly a bug - if you put the
update_or_create call into a transaction then the race condition will
not appear.   Maybe this needs to be added to the docs.

> crufty code we'll have to maintain compatibility with (remember that cruft
> accumulation was basically what killed Class::DBI, and I really don't want
> to have to write -another- ORM :).



-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to