[Catalyst] Duplicate entries with C::P::Session::Store::DBIC and MySQL - new findings

Sergio Salvi sergio.lists at salvi.ca
Fri Dec 12 21:45:04 GMT 2008


On Thu, Dec 11, 2008 at 12:04 PM, Sergio Salvi <sergio.lists at salvi.ca> wrote:
> On Thu, Nov 20, 2008 at 4:49 PM, Tobias Kremer <list at funkreich.de> wrote:
>> On 20.11.2008, at 21:16, Sergio Salvi wrote:
>>>
>>> I still think the final solution (besides finding a way to make
>>> find_or_create() atomic), is to store flash data the session row
>>> (either on the same column of session or on a new, dedicated column).
>>
>> Sergio++
>>
>> FWIW, I rolled my own flash mechanism which does exactly that (store the
>> flash value in the session) and haven't looked back since. I've seen about 3
>> duplicate entry errors in the last 3 months opposed to several hundreds a
>> week with C::P::Session's flash method.
>>
>
> I've committed the "flash in session" patch, please try it out:
>
> http://lists.scsys.co.uk/pipermail/catalyst-dev/2008-December/001573.html
>

I've applied both patches into this branch:
http://dev.catalyst.perl.org/svnweb/Catalyst/browse/branches/Catalyst-Plugin-Session/both/

This is supposed to fix:

- duplicate key issue when using flash()
- session finalization order race condition

Please try it out :)

Sergio Salvi



More information about the Catalyst mailing list