jujiale opened a new issue, #9831:
URL: https://github.com/apache/apisix/issues/9831

   ### Description
   
   hello.
   as this issue methioned:  
[#5607](https://github.com/apache/apisix/issues/5607)
   
   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
                        }]
                }]
        }
   
   }
   
   `
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): v2.12.0
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):3.5.0
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


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