kingluo commented on code in PR #9016:
URL: https://github.com/apache/apisix/pull/9016#discussion_r1130380739


##########
apisix/upstream.lua:
##########
@@ -115,8 +122,11 @@ local function create_checker(upstream)
     end
 
     if healthcheck_parent.checker then

Review Comment:
   @monkeyDluffy6017 @spacewander @moonming @membphis
   I take back what I concluded. That code is not dead code, although it's not 
for concurrent checker creation guard,  it's necessary for service discovery. 
   **Each time the discovery result changes, the upstream (inlined in 
route/service or separate upstream) will do a shallow copy and reserves its 
parent, so the parent (route/service/upstream) may have a previous checker.**
   
   
https://github.com/apache/apisix/blob/c159f04d845c6cdf2dbb32931da7af127bdb60a6/apisix/upstream.lua#L272-L284



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