Skip to content

Commit

Permalink
Fix empty shardkey
Browse files Browse the repository at this point in the history
  • Loading branch information
danilapog committed Dec 10, 2024
1 parent 028e6ff commit f20cb42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/balancer/lua/docs_balancer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function _M.balance_ep()
rr_live_dict:set("last_used_index", idx)
end

if api_key then
if api_key and string.len(api_key) > 0 then
return random_endpoint
else
ngx_balancer.set_more_tries(1)
Expand Down

0 comments on commit f20cb42

Please sign in to comment.