From b99cd00a121e1f80077144678207f21c82690544 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 4 Dec 2018 16:23:18 +0000 Subject: [PATCH] [Fix] Sort data received from Sentinel to avoid constant replacing Issue: #2664 Closes: #2664 --- lualib/lua_redis.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index b246899db7..0c6520e5ce 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -143,6 +143,9 @@ local function redis_query_sentinel(ev_base, params, initialised) end end + table.sort(read_servers_tbl) + table.sort(write_servers_tbl) + local read_servers_str = table.concat(read_servers_tbl, ',') local write_servers_str = table.concat(write_servers_tbl, ',') -- 2.47.3