[Asterisk-code-review] res pjsip registrar: mitigate blocked threads on reliable tr... (asterisk[16])
Kevin Harwell
asteriskteam at digium.com
Tue Jan 22 13:02:07 CST 2019
Hello Friendly Automation, Joshua C. Colp,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/10908
to look at the new patch set (#2).
Change subject: res_pjsip_registrar: mitigate blocked threads on reliable transport shutdown
......................................................................
res_pjsip_registrar: mitigate blocked threads on reliable transport shutdown
When a reliable transport is shutdown it's possible for the pjsip registrar
resource shutdown handler to get called multiple times. If this happens and one
of the threads is taking "too long" (slow database call for instance) then the
others get blocked waiting to delete.
Since it only takes one to delete the contact then the other threads should be
able to continue on if one of the threads is currently "deleting". This patch
makes it so now when a thread enters the shutdown handler it checks to see if a
thread is currently already "deleting". If so, then the thread does not attempt
to get the lock, and instead continues on thus avoiding the blockage.
ASTERISK-28213 #close
Change-Id: I7563ca596312b1dff4f3ab41483e89fe2862328a
---
M res/res_pjsip_registrar.c
1 file changed, 29 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/08/10908/2
--
To view, visit https://gerrit.asterisk.org/10908
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7563ca596312b1dff4f3ab41483e89fe2862328a
Gerrit-Change-Number: 10908
Gerrit-PatchSet: 2
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190122/78bf5427/attachment.html>
More information about the asterisk-code-review
mailing list