[OpenSIPS-Devel] [ opensips-Bugs-2684958 ] Holding the hash_table lock for subscriptions too long

SourceForge.net noreply at sourceforge.net
Thu Mar 12 16:34:07 CET 2009


Bugs item #2684958, was opened at 2009-03-12 13:55
Message generated for change (Comment added) made by anca_vamanu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2684958&group_id=232389

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: trunk
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Vasil Kolev (krokodilerian)
>Assigned to: Anca Vamanu (anca_vamanu)
Summary: Holding the hash_table lock for subscriptions too long

Initial Comment:
In subscribe.c:update_db_subs() the lock for the hash part is held until all the notifies are sent. This is a problem, as if you're using tcp, these operations take too long and block the processing of SUBSCRIBE requests.

The attached patch releases the lock before doing the notifies and re-aquires it afterwards.

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

>Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-03-12 17:34

Message:
Hi Vasil,

Thank you for finding this error and offering a solution for it. 
I chose to copy the subscription structure before releasing the lock and
using that copy when constructing the Notify. It is safer this way as there
is the possibility for the record to be deleted in the mean time.

Thanks and regards,
Anca

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2684958&group_id=232389



More information about the Devel mailing list