From 4d491782d4e552b482a55ac2e4365fbd5b745bab Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Tue, 17 Mar 2020 19:07:48 +0100 Subject: [PATCH] TT#78153 fix _item_by_aor for redis - prevent unneccesary redis "scan"s - avoid filter/scan (iterating all registrations) by properly un-aliasing filednames - ignore any registration of subs that no longer exists - apply the fixes for ->search(), but also ->find() (cherry picked from commit adabbf084bbad7d66fcc3bb845fd4ce47946f329) (cherry picked from commit 65a3d54d240277d195c9d45cc66b3d42b68b3269) Change-Id: Iad554dbb909421458784de4230a3129fca56ac5f --- lib/NGCP/Panel/Utils/RedisLocationResultSet.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Utils/RedisLocationResultSet.pm b/lib/NGCP/Panel/Utils/RedisLocationResultSet.pm index dced0e165b..0ef9258cb9 100644 --- a/lib/NGCP/Panel/Utils/RedisLocationResultSet.pm +++ b/lib/NGCP/Panel/Utils/RedisLocationResultSet.pm @@ -163,7 +163,7 @@ sub _rows_from_mapkey { '+select' => ['reseller.id'], '+as' => ['reseller_id'] })->first; - next unless $subscribers_reseller; + return unless $subscribers_reseller; if (exists $filter->{reseller_id} && $filter->{reseller_id} != $subscribers_reseller->get_column('reseller_id')) { next; }