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



##########
File path: apisix/plugins/traffic-split.lua
##########
@@ -306,6 +306,10 @@ function _M.access(conf, ctx)
     core.log.info("match_flag: ", match_flag)
 
     if not match_flag then
+        if ctx.matched_route.value["original_uid"] then

Review comment:
       Better to use value.original_upstream_id

##########
File path: apisix/plugins/traffic-split.lua
##########
@@ -320,6 +324,7 @@ function _M.access(conf, ctx)
         core.log.info("upstream: ", core.json.encode(upstream))
         return set_upstream(upstream, ctx)
     elseif upstream and upstream ~= "plugin#upstream#is#empty" then
+        ctx.matched_route.value["original_uid"] = 
ctx.matched_route.value.upstream_id

Review comment:
       Should do the same thing with the code below?
   ```
       core.log.info("route_up: ", upstream)
       ctx.matched_route.value.upstream_id = nil
   ```




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