On Friday 07 October 2011 14:48:14 Tobias Kremer wrote:

> 3. Both requests try to insert a new session, one succeeds, the other
> dies(!) with a duplicate key constraint error from MySQL.

Sounds like this should be changed from "insert" to "insert_or_update"
which is wrapped within a transaction with "serializable" transaction
isolation level (because we might not know if the "insert_or_update"
method is atomic)... or something along those lines without looking
at the code.

Or alternatively the failed read of old cookie and the insert of the
new cookie could be wrapped in a single "serializable" transaction.

--
Janne Snabb / EPIPE Communications
[email protected] - http://epipe.com/

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to