[OpenSIPS-Devel] SF.net SVN: opensips:[8105] trunk/modules/usrloc

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jun 30 20:14:40 CEST 2011


Hi Stan,

On 06/30/2011 08:48 PM, Stanisław Pitucha wrote:
> On 30 June 2011 17:25, Bogdan-Andrei Iancu<bogdan at opensips.org>  wrote:
>> Revision: 8105
>>           http://opensips.svn.sourceforge.net/opensips/?rev=8105&view=rev
>> Author:   bogdan_iancu
>> Date:     2011-06-30 16:25:18 +0000 (Thu, 30 Jun 2011)
>>
>> Log Message:
>> -----------
>> - fixed race between UPDATE and DELETE when using DB_ONLY mode (one processe can update a record, while timer proc tries to delete it). The result is loosing contacts from database. The fix is to use REPLACE (if available on DB level) instead of UPDATE (as records may be missing).
>>   Based on an original idea from patch #2969454; Credits go to Stanislaw Pitucha
> I think a bit too much stuff was stripped. Now the old db schema is
> used without any control from the user.
> That means there's no unique key to generate the conflict
> (update/replace happens only on key collision) on insert
Thanks for reminding me on that - I almost forgot to update the DB 
schema and to add the unique key constraint as you mentioned  - just did 
that

>   and no way to
> turn off the "atomic" updates from the config if you want the old
> schema... Unless it's properly documented in the manual it might cause
> some really bizarre situations for people using DB_ONLY.
What kind of side effects are you referring at ? My idea was to try to 
automatically fix the problem (when DB_ONLY is used), transparent for 
the user. Of course, it is not a big deal to add the config switch for 
that, but I don't see why you should disable it and run a buggy code :D.

Thanks and regards,
Bogdan


-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"




More information about the Devel mailing list