jujiale commented on issue #5607:
URL: https://github.com/apache/apisix/issues/5607#issuecomment-1633740122

   I also suffered such a situation. but I can not reproduce it. the error log 
is :
   `
   
       /traffic-split.lua:209: attempt to index field 'upstream' (a string 
value)
   
   `
   
   according the source code. when the traffic-split plugin config 
"weighted_upstreams" . it's element has no property "upstream". but have 
property "upstream_id", it should not invode the follwing code (line 209, 
because **elseif upstream_obj.upstream then** return false )
   
![image](https://github.com/apache/apisix/assets/48037235/1f602a6c-318e-45dd-8764-a0357fde732a)
   
   so I confused why line 209 is invoked.
   
   traffic_split config is below:
   `
   
       {
        "traffic-split": {
                "disable": false,
                "rules": [{
                        "weighted_upstreams": [{
                                "weight": 0
                        }, {
                                "upstream_id": "466807194923303750",
                                "weight": 100
                        }, {
                                "upstream_id": "466807194721978186",
                                "weight": 0
                        }]
                }]
        }
   
   }
   
   `
   
   
   


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

To unsubscribe, e-mail: [email protected]

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

Reply via email to