membphis commented on code in PR #13592:
URL: https://github.com/apache/apisix/pull/13592#discussion_r3464920832


##########
apisix/healthcheck_manager.lua:
##########
@@ -247,17 +254,34 @@ local function timer_working_pool_check()
                 --- callback construct_upstream to create an upstream 
dynamically
                 local upstream_constructor_config = jp.value(res_conf.value, 
json_path)
                 local plugin = require("apisix.plugins." .. plugin_name)
-                upstream = 
plugin.construct_upstream(upstream_constructor_config)
-                upstream.resource_key = resource_path
+                ok, upstream, err = pcall(plugin.construct_upstream, 
upstream_constructor_config)

Review Comment:
   [P2] This keeps the old checker for every construct_upstream failure. If the 
JSON path no longer exists because the ai-proxy-multi plugin or instance was 
removed, the old healthchecker can stay running. Consider treating 
upstream_constructor_config == nil as a real removal and allowing the checker 
to be destroyed.



-- 
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