<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.2.3">
</HEAD>
<BODY>
Hi Klaus,<BR>
<BR>
By wrapping the queries into a DB transaction do you mean something along the lines of doing BEGIN/COMMIT/ROLLBACK in PostgreSQL around some sets of transactions?&nbsp; For example, the query selecting records with the updated flag set and subsequent query to unset the flag?<BR>
<BR>
If so this would be good to prevent multiple servers attempting to do the same set of updates at the same time.&nbsp; Is there an easy (and DB independent) way to do this Kamailio?<BR>
<BR>
I am not sure I understand the issue about auto_reconnect?<BR>
<BR>
Thanks,<BR>
<BR>
Peter<BR>
<BR>
On Fri, 2012-04-20 at 10:03 +0200, Klaus Darilion wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi Peter!

I remember we had some discussion that same queries may be wrapped into 
a DB transaction to avoid inconsistencies when using multiple presence 
servers.

I just wonder if this is now the case or not. Because then, 
auto_reconnect in the DB module must be disabled as it may happen that 
the connection is closed/connected during a transaction.

regards
Klaus

On 18.04.2012 18:36, Peter Dunkley wrote:
&gt; Module: sip-router
&gt; Branch: master
&gt; Commit: dff68160e4decc43f2da8948ea03bc4d469ded96
&gt; URL:    <A HREF="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dff68160e4decc43f2da8948ea03bc4d469ded96">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dff68160e4decc43f2da8948ea03bc4d469ded96</A>
&gt;
&gt; Author: Peter Dunkley&lt;<A HREF="mailto:peter.dunkley@crocodile-rcs.com">peter.dunkley@crocodile-rcs.com</A>&gt;
&gt; Committer: Peter Dunkley&lt;<A HREF="mailto:peter.dunkley@crocodile-rcs.com">peter.dunkley@crocodile-rcs.com</A>&gt;
&gt; Date:   Wed Apr 18 17:29:32 2012 +0100
&gt;
&gt; modules_k/rls: RLS full-state NOTIFY requests now sent by notifier process(es)
&gt;
&gt; - Also modified the notifier process stuff to only work when in
&gt;    DB only mode.  This is because the full-state handling stuff
&gt;    in the notifier processes relies on DB only mode.
&gt; - Leaving the full-state stuff outside of the notifier process
&gt;    didn't work because there was a row update race between the
&gt;    notifier process and non-notifier process when full-state and non-
&gt;    full-state NOTIFY requests were generated at the same time.
&gt; - This ensures that (with default options) you get at most one NOTIFY
&gt;    (or set of NOTIFYs when splitting large NOTIFYs is enabled) per
&gt;    5s per watcher from RLS.
&gt; - It also helps spread out the NOTIFY generation load more evenly
&gt;    across time.
&gt;
&gt; ---
&gt;
&gt;   modules_k/rls/README            |    6 ++
&gt;   modules_k/rls/doc/rls_admin.xml |    8 ++
&gt;   modules_k/rls/resource_notify.c |  175 +++++++++++++++++++++++++++++++++++++--
&gt;   modules_k/rls/rls.c             |   25 ++++--
&gt;   modules_k/rls/rls.h             |    3 +
&gt;   modules_k/rls/rls_db.c          |   20 ++++-
&gt;   modules_k/rls/subscribe.c       |   40 ++++++----
&gt;   7 files changed, 240 insertions(+), 37 deletions(-)
&gt;
&gt; Diff:   <A HREF="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=dff68160e4decc43f2da8948ea03bc4d469ded96">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=dff68160e4decc43f2da8948ea03bc4d469ded96</A>
&gt;
&gt; _______________________________________________
&gt; sr-dev mailing list
&gt; <A HREF="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</A>
&gt; <A HREF="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>