<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Jose,</p>
<p>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.</p>
<p>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).</p>
<p>According to the module readme this full table scan could be avoided by defining a proper mapping in the module parameter:<br>
</p>
<p>"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."</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="moz-cite-prefix">Am 22.05.19 um 15:26 schrieb José Seabra:<br>
</div>
<blockquote type="cite" cite="mid:CAEVZRWuTykTO6S8JNA6+g=UMK-5FzrXKe0b8OfbK6TmaZ3FPOQ@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">Hello there,
<div>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:</div>
<div><br>
</div>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>
<div>
<div><i>WARNING: PR_LOG: <a href="mailto:5a14aea50d9d9b17-75@172.31.1.11" moz-do-not-send="true">
5a14aea50d9d9b17-75@172.31.1.11</a>: db_redis [redis_dbase.c:1099]: db_redis_perform_query(): performing full table scan on table 'location' while performing query</i></div>
</div>
</div>
<div>
<div><i>WARNING: PR_LOG: <a href="mailto:5a14aea50d9d9b17-75@172.31.1.11" moz-do-not-send="true">
5a14aea50d9d9b17-75@172.31.1.11</a>: db_redis [redis_dbase.c:1102]: db_redis_perform_query():   scan key 0 is 'expires'</i></div>
</div>
<div>
<div><i>WARNING: PR_LOG: <a href="mailto:5a14aea50d9d9b17-75@172.31.1.11" moz-do-not-send="true">
5a14aea50d9d9b17-75@172.31.1.11</a>: db_redis [redis_dbase.c:1102]: db_redis_perform_query():   scan key 1 is 'expires'</i></div>
</div>
<div>
<div><i>WARNING: PR_LOG: <a href="mailto:5a14aea50d9d9b17-75@172.31.1.11" moz-do-not-send="true">
5a14aea50d9d9b17-75@172.31.1.11</a>: db_redis [redis_dbase.c:1274]: db_redis_perform_delete(): performing full table scan on table 'location' while performing delete</i></div>
</div>
<div>
<div><i>WARNING: PR_LOG: <a href="mailto:5a14aea50d9d9b17-75@172.31.1.11" moz-do-not-send="true">
5a14aea50d9d9b17-75@172.31.1.11</a>: db_redis [redis_dbase.c:1277]: db_redis_perform_delete():   scan key 0 is 'expires'</i></div>
</div>
<div>
<div><i>WARNING: PR_LOG: <a href="mailto:5a14aea50d9d9b17-75@172.31.1.11" moz-do-not-send="true">
5a14aea50d9d9b17-75@172.31.1.11</a>: db_redis [redis_dbase.c:1277]: db_redis_perform_delete():   scan key 1 is 'expires'</i></div>
</div>
</blockquote>
<div dir="ltr">
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>Thank you for your support </div>
<div>Cheers</div>
<div>José</div>
-- <br>
<div dir="ltr" class="gmail_signature">Cumprimentos
<div>José Seabra</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>