On Fri, May 7, 2010 at 2:33 AM, Tobias Kremer <tobias.kre...@gmail.com>wrote:

> I'm not sure why this is happening because the _load_row() method of
> the store delegate explicitly wraps everything in a txn_do() which
> should make the find_or_create() atomic and not prone to concurrent
> select/insert/update problems.
>

Does it make it atomic or just fail if a second session tries to create with
the same primary key?

Looking at some old code I see that I first attempt a create, and if that
fails with a duplicate error I then do a find.  Don't need a transaction for
that.


-- 
Bill Moseley
mose...@hank.org
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to