You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/03 07:07:57 UTC

[GitHub] [apisix] zhendongcmss commented on a diff in pull request #6934: fix(balancer): Add test cases when setting upstream doesn't specify priority

zhendongcmss commented on code in PR #6934:
URL: https://github.com/apache/apisix/pull/6934#discussion_r863520908


##########
apisix/balancer.lua:
##########
@@ -50,12 +50,17 @@ local function transform_node(new_nodes, node)
         new_nodes._priority_index = {}
     end
 
-    if not new_nodes[node.priority] then
-        new_nodes[node.priority] = {}
-        core.table.insert(new_nodes._priority_index, node.priority)
+    local node_priority = 0   -- if nodes don't specify priority using default
+    if node.priority then

Review Comment:
   If you don't agree with that add the priority. I think it is necessary to add test cases to test it.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org