<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [X] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail --> Issue: when using usrloc with db_redis, I get constant WARNING logs for 'delete' via usrloc timer. The real WARNING, in my opinion, is when doing full table scans(which is already logged as so).
Make logs less important when performing table scans using a match key. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3892
-- Commit Summary --
* db_redis: change logs on delete
-- File Changes --
M src/modules/db_redis/redis_dbase.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3892.patch https://github.com/kamailio/kamailio/pull/3892.diff
@smititelu pushed 1 commit.
85c244e6a55a8391c744624b5d3678d550481d1a db_redis: change logs on delete
@smititelu pushed 1 commit.
34b15758bd4ec9b1f09174e981af0675b9068c7d db_redis: change logs on delete
@smititelu pushed 1 commit.
fa202d1112c9df29358c261e670b6bbfff9fc856 db_redis: change logs on delete
I never get clang formatting right, unless using the clang-format tool :D
If there is indeed a performance implication in this table scans with key, maybe we should not silence it completely by using DBG and using INFO instead. But maybe @agranig like to comment as well here.
Fine to merge it from my perspective, I guess that some full table scans can't be avoided always.
Thanks for reviews. Merging this.
Actually if one designs the 'keys' right for a db_redis table, should get *no* full table scans (I think, at least from my tests so far). So then will get no warnings after this merge.
Full table scans are actually dangerous because consume alot of kamailio PKG memory. So if one's db_redis table is big, and full scans are performed => kamailio processes won;t be able to load it in the first palce. So the WARNING for performing full table scan is still there, because of this.
Tip: For location table in db_redis i got no full table scans anymore (e.g. when contact expires or when user contacts is queried) when using this key definition: ``` modparam("db_redis", "keys", "location=entry:ruid&usrdom:username,domain&timer:expires") ``` ... because index info is added in redis for 'user@domain' or for user's contact 'expires' so only those ones need to be scanned and iterated => no full scans needed
Merged #3892 into master.