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



##########
File path: apisix/balancer.lua
##########
@@ -218,8 +219,9 @@ local function pick_server(route, ctx)
     if checker then
         version = version .. "#" .. checker.status_ver
     end
+    local cache_key = key..ngx.md5(up_conf.nodes)

Review comment:
       The argument type of `ngx.md5` is string while `up_conf.nodes` is an 
array-like table.
   
   BTW, i don't think calculating the md5sum of nodes is a good way to 
differentiate the version, it's heavy, what about introducing the version 
mechanism for `up_conf.nodes`, either version number or last modify time is OK.

##########
File path: apisix/balancer.lua
##########
@@ -218,8 +219,9 @@ local function pick_server(route, ctx)
     if checker then
         version = version .. "#" .. checker.status_ver
     end
+    local cache_key = key..ngx.md5(up_conf.nodes)

Review comment:
       style: need space on both left and right side of `..`.




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