-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: the traffic-split plugin is invalid to bind upstream via upstream_id #3740
Comments
"weighted_upstreams":[
{
"upstream_id":"2"
}
] should be "weighted_upstreams":[
{
"upstream_id":2
}
] the type of by the way, it is an interesting bug core.log.warn("route.value.upstream_id: ", core.json.encode(route.value.upstream_id)) between the line 71 and the line 72 Lines 70 to 73 in a97ba0d
I found that when the bug appeared, the I don't know what caused the change. |
I was wrong, according to the documentation, the type of |
here are the reasons for the bugs I found:
|
@tzssangglass Would you like to submit a PR to solve this issue? Thanks! |
assigned to me |
Thank you very much. |
Issue description
When both the routing and traffic-split plugins use upstream_id to bind upstream, the request distribution is not accurate.
1、add route and bind plugin
The upstream_id is 1, the response data is 1980, and the upstream_id is 2 the response data is 1981.
2、Test plugin
The vars rule passes:
The vars rule failed:
The vars rule passes:
The vars rule failed (an exception occurred):
The text was updated successfully, but these errors were encountered: