ChuanFF commented on code in PR #12991:
URL: https://github.com/apache/apisix/pull/12991#discussion_r2866850636
##########
apisix/balancer.lua:
##########
@@ -55,7 +57,24 @@ local function transform_node(new_nodes, node)
core.table.insert(new_nodes._priority_index, node.priority)
end
- new_nodes[node.priority][node.host .. ":" .. node.port] = node.weight
+ local weight = node.weight
+ if warm_up_conf then
+ local start_time = node.update_time
+ if start_time then
+ local time_since_start_seconds = math_max(ngx_time() - start_time,
1)
Review Comment:
This references Envoy, where the minimum time difference should be 1, not 0.
A time difference of 0 would result in a node weight of 0, but a node weight of
0 during warm-up should be meaningless.
--
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]