biakecw commented on code in PR #8219:
URL: https://github.com/apache/apisix/pull/8219#discussion_r1015052122


##########
apisix/admin/stream_routes.lua:
##########
@@ -142,8 +163,18 @@ function _M.delete(id)
         return 400, {error_msg = "missing stream route id"}
     end
 
+    local items,_ = routes()
     local key = "/stream_routes/" .. id
     -- core.log.info("key: ", key)
+    local refer_list = {}
+    if items ~= nil then
+        refer_list=check_router_refer(items,id)
+    end
+    if #refer_list >0 then
+        local warn_message = key.." is referred by 
"..table.concat(refer_list,";;")
+        return 400,warn_message
+    end

Review Comment:
   Thanks for your comments about core.tablepool.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to