tzssangglass commented on issue #3740:
URL: https://github.com/apache/apisix/issues/3740#issuecomment-789768684


   ```json
   "weighted_upstreams":[
                           {
                               "upstream_id":"2"
                           }
                       ]
   ```
   should be 
   ```json
   "weighted_upstreams":[
                           {
                               "upstream_id":2
                           }
                       ]
   ```
   
   the type of `upstream_id` is number but not string.
   
   by the way, it is an interesting bug
   I added a debug log
   ```lua
   core.log.warn("route.value.upstream_id: ", 
core.json.encode(route.value.upstream_id))
   ```
   between the line 71 and the line 72 
https://github.com/apache/apisix/blob/a97ba0ddf7ce8c0aca2374b774f1da8f98913a09/apisix/http/route.lua#L70-L73
   
   I found that when the bug appeared, the `upstream_id` changed from `1` to 
`2`.
   
   I don't know what caused the change.
   


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


Reply via email to