tokers commented on a change in pull request #4208:
URL: https://github.com/apache/apisix/pull/4208#discussion_r631523089



##########
File path: apisix/balancer.lua
##########
@@ -98,16 +98,29 @@ local function create_server_picker(upstream, checker)
     end
 
     if picker then
+        local nodes = upstream.nodes
+        local addr_to_domain = {}
+        for _, node in ipairs(nodes) do
+            if node.domain then
+                local addr = node.host .. ":" .. node.port
+                addr_to_domain[addr] = node.domain
+            end
+        end
+
         local up_nodes = fetch_health_nodes(upstream, checker)
 
         if #up_nodes._priority_index > 1 then
             core.log.info("upstream nodes: ", core.json.delay_encode(up_nodes))
-            return priority_balancer.new(up_nodes, upstream, picker)
+            local server_picker = priority_balancer.new(up_nodes, upstream, 
picker)

Review comment:
       OK.




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