<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/20 Walter Doekes <span dir="ltr"><<a href="mailto:walter+asterisk-dev@osso.nl" target="_blank">walter+asterisk-dev@osso.nl</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 20/08/13 12:24, Leandro Dardini wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am running a cluster of asterisk servers and each one is writing the<br>
CDR to 2 mysql servers configured with multi master replication using<br>
the cdr_adaptive_odbc driver.<br>
</blockquote>
<br></div>
[...]<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As you can imagine, if both mysql servers are available, every CDR is<br>
written twice.<br>
</blockquote>
<br></div>
Without going into detail here: if you're writing to two databases always, you're not using your multi-master setup right.<br>
<br>
A second server should be consulted only if the first one isn't available.<br>
<br>
Cheers,<br>
Walter<br></blockquote><div><br></div><div>Yes, I agree with you about using the second database only if the first is not available, but unfortunately the cdr_odbc_adaptive driver I am using is not working that way. While other part of asterisk, like the func_odbc can be configured to use a primary/backup odbc connection, there is no way to do it with cdr_odbc_adaptive or am I wrong?</div>
<div><br></div><div>I have already made a little patch to allow for an additional parameter in cdr_odbc_adaptive.conf to drive the usage of INSERT IGNORE instead of just INSERT. I know it will be a lots better to have a working active/backup configuration for cdr_odbc_adaptive, but making that patch is beyond my reach right now. </div>
<div><br></div><div>I just was checking if there was any interest in receiving the little "INSERT IGNORE" patch... </div><div><br></div><div>Leandro<br></div><div><br></div><div><br></div><div><br></div></div></div>
</div>