### Description

Carrierroute module takes now 16 minutes to load about 50'000 entries from 
postgres-db.
In version 5.0.3 it was 10 seconds from the same db.

### Troubleshooting

#### Reproduction

Install kamailio 5.0.3 and fill your carrierroute table with thousands of 
entries. See how fast its loaded.
Then install 5.0.4 and see how long it takes now.
You can observe the query "SELECT * FROM carrierroute WHERE carrier=1 and 
domain=1 and prob>0" multiple times in the postgres-db log.

#### Debugging Data

none.

#### Log Messages

not needed.

#### SIP Traffic

not needed.

### Possible Solutions

Perhaps try to do the check "in-memory" instead generate a new sql-query.

### Additional Information

This bug exists in Kamilio versions >=5.0.4 and is (potentially) introduced by:

commit 9800aba65146b72623bb512049300d1beb8c8ec4
Author: Huseyin Dikme <[email protected]>
Date:   Tue Sep 12 15:37:17 2017 +0200
    carrierroute: warning for the same carrier/domain having routes with only 0 
probability
    - While starting kamailio or reloading the routes, if the same 
carrier/domain pairs do not have
      any route with a probability other than 0 (zero) then an error log will 
be printed on the screen.
      Besides, the log "invalid dice_max value" in the cr_func.c has been made 
more clear.
    (cherry picked from commit 9741bee7af8136b35af8e6279e530aa0ad54f574)

* **Operating System**:

Ubuntu 20.04.2 LTS
Linux 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 
x86_64 x86_64 GNU/Linux


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2653
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to