Menu

#456 Registrar's use of 'lookup' modifies DB storage

ver 1.2.x
open
modules (357)
2
2008-07-17
2008-05-08
No

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.

Discussion

  • Daniel-Constantin Mierla

    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.

     
  • Daniel-Constantin Mierla

    • assigned_to: nobody --> miconda
     
  • Daniel-Constantin Mierla

    • priority: 5 --> 2
     
  • Daniel-Constantin Mierla

    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.

     
  • Henning Westerholt

    Hi Daniel,

    any updates on this one? I'm also interested in disabling the expire with timer with a module parameter or having a read-only mode. At the moment we deactivate them with a patch completely, as we use some external expire mechanism.

    Henning

     

Log in to post a comment.

MongoDB Logo MongoDB