[OpenSER-Devel] [ openser-Bugs-1960100 ] Registrar's use of 'lookup' modifies DB storage

SourceForge.net noreply at sourceforge.net
Thu Jul 17 09:06:01 CEST 2008


Bugs item #1960100, was opened at 2008-05-08 11:55
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1960100&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.2.x
Status: Open
Resolution: None
>Priority: 2
Private: No
Submitted By: axlh (axlh)
Assigned to: Daniel-Constantin Mierla (miconda)
Summary: Registrar's use of 'lookup' modifies DB storage

Initial Comment:
When a proxy has the 'lookup()' function (in DB mode) mentioned in the config file, it will start expiring the DB records. This results in either:

1) Lots of error messages as the DB account used by the proxy may have only read-only access (the registrar has rw access)

or
 
2) Race conditions between registrar and proxy. The current expiration and registration code is absolutely non-atomic and very race-prone. If the proxy is deleting location entries from the DB, the registrar will fail with registrations from the same user. (Because the registrar does not check if the contact is still in the DB, but that's a separate bug.)

Suggested fix:

Only do expiration when instructed to by a module-parameter (preferred) or when the 'save()' function is used.


----------------------------------------------------------------------

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-07-17 10:06

Message:
Logged In: YES 
user_id=1246013
Originator: NO

I will upload a quick patch on the tracker for this specific issue. A
proper read-only mode shall take care of save() function as well and should
be read-only regardless is db-only or combined. The patch will be to big
for inclusion now. Being in between a bug and enhancement, I would postpone
for next release the completion for it.

----------------------------------------------------------------------

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-06-27 11:09

Message:
Logged In: YES 
user_id=1246013
Originator: NO

The delete happens on timer, not at lookup(). But indeed it is an issue.
Disabling the db delete on timer op is a quick fix, perhaps for future
releases save() should be disabled in this case.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1960100&group_id=139143



More information about the Devel mailing list