membphis commented on a change in pull request #1022: Feature/chash key support 
more flexible ways
URL: https://github.com/apache/incubator-apisix/pull/1022#discussion_r363145202
 
 

 ##########
 File path: lua/apisix/balancer.lua
 ##########
 @@ -151,11 +184,11 @@ local function create_server_picker(upstream, checker)
         end
 
         local picker = resty_chash:new(nodes)
-        local key = upstream.key
         return {
             upstream = upstream,
             get = function (ctx)
-                local id = picker:find(ctx.var[key])
+                local chash_key = create_chash_hash_key(ctx, upstream)
 
 Review comment:
   `fetch_chash_hash_key`
   
   How about this name?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to