fix: the traffic-split plugin is invalid to bind upstream via upstream_id#3758
Conversation
…s` has a structure with only `weight`
|
After apply this change: many test cases are failed. Look like |
yes, according to my understanding, I think the design idea of take a look at apisix/apisix/plugins/traffic-split.lua Lines 322 to 323 in 6cbaf55 |
|
There should be a way to do the same thing without corrupting the data. Otherwise once the cache is evicted we will be in trouble. |
This PR does not do this work. If needed, we should open another issue to discuss it, as it would involve refactoring the plugin's implementation logic. |
What this PR does / why we need it:
fix: #3740
Pre-submission checklist:
the cause of the bug reference: #3740 (comment)
this change temporarily stores the route'supstream_idin thematched_routetable. If the current requestmatchfails and the temporarily storedupstream_idexists in thematched_routetable, the route'supstream_idis restored to the temporarily storedupstream_id.when the
routeis configured with anupstream_id, theupstream_idis passed into theserver_list.