tzssangglass commented on issue #8118:
URL: https://github.com/apache/apisix/issues/8118#issuecomment-1283979949

   > 是的 目前定位到在经过init.lua _M.http_access_phase() 
router.router_http.match(api_ctx) —> radixtree_uri.lua _M.match(api_ctx)—> 
radixtree_uri.lua base_router.match_uri(uri_router, match_opts, api_ctx) 
—>route.lua _M.match_uri(uri_router, match_opts, api_ctx) 经过 local ok = 
uri_router:dispatch(api_ctx.var.uri, match_opts, api_ctx, match_opts) 
一行获取到的match_opts中 matched_route upstream node为上次修改后的upstream api_ctx参数中也如此
   
   I reproduced the problem you mentioned.
   
   I found out first because `up_conf.nodes` came from `matched_route`, and 
`matched_route` came from the `route` when `creating 
create_radixtree_uri_router`, which is cross-requested.
   
   In short, the `up_conf.nodes` you modified is cross-request, and we should 
not modify `up_conf.nodes` directly.
   
   you can deepcopy `up_conf.nodes` and use the copy object.


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