sheharyaar commented on issue #9805: URL: https://github.com/apache/apisix/issues/9805#issuecomment-1871083461
I would like to add to the explanation. 1) When the nodes are different on comparison, the new_nodes are assigned to `up_conf.nodes` using clone : https://github.com/apache/apisix/blob/release/3.4/apisix/upstream.lua#L277-L285. Here the **original_nodes is not changed**. 2) The code then calls `set_directly` with this updated config (where **original nodes has not changed**): https://github.com/apache/apisix/blob/release/3.4/apisix/upstream.lua#L61-L79 3) Here is the set_directly() : https://github.com/apache/apisix/blob/release/3.4/apisix/upstream.lua#L61-L79. This sets the **conf** in the context. This version `merge_service_route` to update the cache. Hence, the original_nodes is not updated till now. 4) After these steps happen, the function calls `fill_node_info`, but _since the context version does not include the updated original_nodes_, it is not updated. It is just updated locally in this function call. Is my explanation correct?? CC : @monkeyDluffy6017 @Sn0rt @shreemaan-abhishek -- 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]
