spacewander commented on a change in pull request #3758:
URL: https://github.com/apache/apisix/pull/3758#discussion_r589897285



##########
File path: apisix/plugins/traffic-split.lua
##########
@@ -309,7 +314,8 @@ function _M.access(conf, ctx)
         return
     end
 
-    local rr_up, err = lrucache(weighted_upstreams, nil, new_rr_obj, 
weighted_upstreams)
+    local rr_up, err = lrucache(weighted_upstreams, nil, new_rr_obj, 
weighted_upstreams,

Review comment:
       @tzssangglass 
   Personally, we need to add `route_upstream_id` to the key as 
`route_upstream_id` and `weighted_upstreams` may change differently. As using 
`route_upstream_id` in the second argument will hit the bug I mention, maybe we 
can switch to use 
https://github.com/apache/apisix/blob/c530135c5a179c99637d52d99e0e8a45ce4cc8b8/apisix/plugins/limit-req.lua#L69?




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

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


Reply via email to