Hello Jose,
if you are concerned about unnecessary log output for your production setup, one simple
way would be just change the log level in your configuration to ERROR. Also other modules
will output WARNING messages for similar cases.
I am not the author of this module, but I think the warning message is correct, as a full
table scan can be indeed costly (especially for large tables).
According to the module readme this full table scan could be avoided by defining a proper
mapping in the module parameter:
"When usrloc does a lookup based on "username@domain", db_redis figures out
via the keys/values the query constructed by usrloc to look for the final entry key in the
mapping set first. It then query the actual entries from there, avoiding full table scans.
For usrloc, the same holds true for expired contacts, requiring a different kind of
mapping."
Cheers,
Henning
Am 22.05.19 um 15:26 schrieb José Seabra:
Hello there,
I'm testing the db_redis with usrloc module in mode 3 and i have been noticing that
every time that kamailio checks if there is contacts expired then it logs the following
warning messages:
WARNING: PR_LOG:
5a14aea50d9d9b17-75@172.31.1.11<mailto:5a14aea50d9d9b17-75@172.31.1.11>: db_redis
[redis_dbase.c:1099]: db_redis_perform_query(): performing full table scan on table
'location' while performing query
WARNING: PR_LOG:
5a14aea50d9d9b17-75@172.31.1.11<mailto:5a14aea50d9d9b17-75@172.31.1.11>: db_redis
[redis_dbase.c:1102]: db_redis_perform_query(): scan key 0 is 'expires'
WARNING: PR_LOG:
5a14aea50d9d9b17-75@172.31.1.11<mailto:5a14aea50d9d9b17-75@172.31.1.11>: db_redis
[redis_dbase.c:1102]: db_redis_perform_query(): scan key 1 is 'expires'
WARNING: PR_LOG:
5a14aea50d9d9b17-75@172.31.1.11<mailto:5a14aea50d9d9b17-75@172.31.1.11>: db_redis
[redis_dbase.c:1274]: db_redis_perform_delete(): performing full table scan on table
'location' while performing delete
WARNING: PR_LOG:
5a14aea50d9d9b17-75@172.31.1.11<mailto:5a14aea50d9d9b17-75@172.31.1.11>: db_redis
[redis_dbase.c:1277]: db_redis_perform_delete(): scan key 0 is 'expires'
WARNING: PR_LOG:
5a14aea50d9d9b17-75@172.31.1.11<mailto:5a14aea50d9d9b17-75@172.31.1.11>: db_redis
[redis_dbase.c:1277]: db_redis_perform_delete(): scan key 1 is 'expires'
I'm not sure what is the rational behind of this, but having these logs being written
when we have log level equal 2 in production is something unnecessary, so i'm asking
if it shouldn't be better we have it as debug instead of warning? or do you forecast
any performance issues using usrloc module in mode 3 with db_redis?
Thank you for your support
Cheers
José
--
Cumprimentos
José Seabra
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Henning Westerholt -
https://skalatan.de/blog/
Kamailio services -
https://skalatan.de/services