Firstsawyou opened a new pull request #3842: URL: https://github.com/apache/apisix/pull/3842
### What this PR does / why we need it: <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> fix #3740 Because the current traffic-split plug-in supports `upstream_id` to refer to the upstream by rewriting the value of `ctx.matched_route.value.upstream_id`. However, when the upstream_id is used by the route and the plugin at the same time, the rewriting of `ctx` will cause the `upstream_id` on the original cached route to be lost. Therefore, this PR creates a temporary variable of `ctx.matched_route.value.upstream_id_tmp` to cache the upstream_id configured in the plug-in, avoiding the modification of `ctx.matched_route.value.upstream_id`. ### Pre-submission checklist: * [x] Did you explain what problem does this PR solve? Or what new features have been added? * [x] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first** ---------------------------------------------------------------- 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]
