<p></p>
<h3>Description</h3>
<p>Carrierroute module takes now 16 minutes to load about 50'000 entries from postgres-db.<br>
In version 5.0.3 it was 10 seconds from the same db.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Install kamailio 5.0.3 and fill your carrierroute table with thousands of entries. See how fast its loaded.<br>
Then install 5.0.4 and see how long it takes now.<br>
You can observe the query "SELECT * FROM carrierroute WHERE carrier=1 and domain=1 and prob>0" multiple times in the postgres-db log.</p>
<h4>Debugging Data</h4>
<p>none.</p>
<h4>Log Messages</h4>
<p>not needed.</p>
<h4>SIP Traffic</h4>
<p>not needed.</p>
<h3>Possible Solutions</h3>
<p>Perhaps try to do the check "in-memory" instead generate a new sql-query.</p>
<h3>Additional Information</h3>
<p>This bug exists in Kamilio versions >=5.0.4 and is (potentially) introduced by:</p>
<p>commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/9800aba65146b72623bb512049300d1beb8c8ec4/hovercard" href="https://github.com/kamailio/kamailio/commit/9800aba65146b72623bb512049300d1beb8c8ec4"><tt>9800aba</tt></a><br>
Author: Huseyin Dikme <a href="mailto:hueseyin.dikme@1und1.de">hueseyin.dikme@1und1.de</a><br>
Date:   Tue Sep 12 15:37:17 2017 +0200<br>
carrierroute: warning for the same carrier/domain having routes with only 0 probability<br>
- While starting kamailio or reloading the routes, if the same carrier/domain pairs do not have<br>
any route with a probability other than 0 (zero) then an error log will be printed on the screen.<br>
Besides, the log "invalid dice_max value" in the cr_func.c has been made more clear.<br>
(cherry picked from commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/9741bee7af8136b35af8e6279e530aa0ad54f574/hovercard" href="https://github.com/kamailio/kamailio/commit/9741bee7af8136b35af8e6279e530aa0ad54f574"><tt>9741bee</tt></a>)</p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<p>Ubuntu 20.04.2 LTS<br>
Linux 5.4.0-66-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="57101384" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/74" data-hovercard-type="pull_request" data-hovercard-url="/kamailio/kamailio/pull/74/hovercard" href="https://github.com/kamailio/kamailio/pull/74">#74</a>-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2653">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMGNPVTYIULP3GZTW3TAVVUXANCNFSM4YFJBHFQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJAKDILGPWVP6VIBPLTAVVUXA5CNFSM4YFJBHF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MFBCYYQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2653",
"url": "https://github.com/kamailio/kamailio/issues/2653",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>