TT#63000 fix redis SCAN usage

Redis is allowed to return an empty list in response to a SCAN even when
the iteration isn't complete yet. Only a zero cursor value returned from
a SCAN is indicative of the SCAN being complete.

Change-Id: Ib5da589c6944fcd46b2bbdc11c200e6a4f7108cb
changes/14/31814/4
Richard Fuchs 7 years ago
parent 67446d7fb9
commit a29819349b

@ -41,3 +41,4 @@ sipwise/rtpengine-tcp-forwarding.patch
sipwise/rtpengine-play-media.patch
sipwise/registrar_add_path.patch
upstream/limit_the_execution_of_dialplan_reload.patch
sipwise/db_redis_fix_scan_usage.patch

@ -0,0 +1,14 @@
--- a/src/modules/db_redis/redis_dbase.c
+++ b/src/modules/db_redis/redis_dbase.c
@@ -727,11 +727,6 @@
table_name->len, table_name->s);
goto err;
}
- if (reply->element[1]->elements == 0) {
- LM_DBG("no matching entries found for scan on table '%.*s'\n",
- table_name->len, table_name->s);
- return 0;
- }
*query_keys_count += reply->element[1]->elements;
Loading…
Cancel
Save