TT#84862 fix Redis key expiry

When a Redis key can be deleted directly, we still need to build the
list of type keys for that table in order to delete dependent entries,
which are the indexes used for faster DB access.

Change-Id: Ib8fdad428946263fc9eba466868347fee219dfbc
changes/61/41461/4
Richard Fuchs 6 years ago
parent 6ec5ada88e
commit 107332beae

@ -81,6 +81,7 @@ sipwise/pua_dialoginfo-local_identity_dlg_var.patch
sipwise/dialplan-don-t-stop-loading-rules-on-error.patch
### active development
sipwise/pua_dialoginfo-use-lock-when-use_puburi_avps-is-set.patch
sipwise/fix-db-redis-key-expiry.patch
#
### Don't just put stuff in any order
### use gbp pq import/export tooling to help maintain patches

@ -0,0 +1,23 @@
--- a/src/modules/db_redis/redis_dbase.c
+++ b/src/modules/db_redis/redis_dbase.c
@@ -1688,12 +1688,6 @@
if (tmp)
db_redis_key_free(&tmp);
- // skip if delete all rows
- if (!*manual_keys_count) {
- db_redis_key_free (&query_v);
- goto skipkeys;
- }
-
if (db_redis_key_prepend_string(&query_v, "HMGET", 5) != 0) {
LM_ERR("Failed to set hmget command to pre-delete query\n");
goto error;
@@ -1785,7 +1779,6 @@
db_vals = NULL;
db_redis_free_reply(&reply);
- skipkeys:
if (db_redis_key_add_string(&query_v, "DEL", 3) != 0) {
LM_ERR("Failed to add del command to delete query\n");
goto error;
Loading…
Cancel
Save