[sr-dev] [kamailio/kamailio] db_redis: allow deletion of all rows (bf2ecd4)

Richard Fuchs notifications at github.com
Tue Jul 7 17:35:52 CEST 2020


@miconda it happens on every delete. Our "table definitions" use Redis sets to simulate non-unique database indexes. For example if we have a key `entry:foobar` that is a hash and includes a key "test = blah" (so, `HMSET entry:foobar test blah`) and we use the "test" key as a non-unique index, then we'd have a set `index:test:blah` that includes `entry:foobar` as member (`SADD index:test:blah entry:foobar`). So when deleting `entry:foobar` we need to delete that from the `index:test:blah` set (`SREM ...`). This requires fetching the contents of the `entry:foobar` hash when deleting it. So with this commit, when `entry:foobar` is deleted directly by name, there will be no "manual keys" and so the HMGET is skipped and so the SREM fails.

-- 
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/commit/bf2ecd4dec55d5009e0904392d083e17af91977d#commitcomment-40428709
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200707/591847e1/attachment.html>


More information about the sr-dev mailing list