[opencms-dev] Duplicate Entry Exception While CmsObject.LoginUser() - Please Help urgent

Nacho Fernández Orellana nacho.fernandez.orellana at gmail.com
Wed May 20 09:29:36 CEST 2009


Dear Govind and list,

Funny that just yesterday we faced the same issue (stressing with JMeter an
OpenCms installation that included login into the workplace). The problem
reason is that the method that writes user info
(org.opencms.db.generic.CmsUserDriver.internalWriteUserInfos) first deletes
the user info and then loops through the different user info nodes and
writes them one by one. All this block is not synchronized, so concurrent
accesses to inserting (after having both executions deleted) with the same
pair "user_id" and "data_key" will produce a database key violation
exception.

This issue is real but by concept it should also be unimportant, because for
this issue to happen you have to have THE SAME USER login twice at the same
time, and the same time means just in the code after deleting user info and
while inserting. This is almost impossible for actual users to reproduce
even if several logs in with the same username.

I guess it's up to Alkacon guys to evaluate the need of synchronizing that
block of code or not. I hope this helped. Greetings,

Nacho Fernandez.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090520/cc02b6d1/attachment.htm>


More information about the opencms-dev mailing list