Module: sip-router Branch: master Commit: 34cd2acb5370f36238f8765765cee6d97fd18209 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=34cd2acb...
Author: Peter Dunkley peter.dunkley@crocodile-rcs.com Committer: Peter Dunkley peter.dunkley@crocodile-rcs.com Date: Tue Aug 21 15:36:34 2012 +0100
modules_k/presence: Use database row/table locking where supported in DB only mode
- Under load there are lots of DB deadlocks when using (start|end)_transaction() with multiple presence processes and/or servers. - Without using (start|end)_transaction() multiple processes/servers overwrite each others changes. - Using row locking (where possible) and table locking (where required) fixes these problems. - IMPORTANT NOTE: DB only, multi-process/multi-server, presence will only work properly under high-load when using a database driver that supports transactions and locking (currently just db_postgres).
---
modules_k/presence/notify.c | 47 +++++++++++++++++++---- modules_k/presence/presentity.c | 53 +++++++++++++++++++++++++- modules_k/presence/subscribe.c | 81 +++++++++++++++++++++++++++++++++++--- 3 files changed, 165 insertions(+), 16 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=34cd...