CodisLabs / jodis

A java client for codis based on Jedis and Curator
MIT License
216 stars 97 forks source link

Fix: eliminate race conditions in RoundRobinJedisPool causing "use after closing" errors #61

Closed william-cheung closed 5 years ago

william-cheung commented 5 years ago

This fix will enable scaling out of codis proxies w/o affecting codis clients

This fix will also enable rolling-restart of codis proxies w/o affecting codis clients. The rolling-restart process should be like:

for proxy in proxies:
      mark_offline(proxy)  # set the status of 'proxy' to 'offline'
      sleep(10)  # wait 10 seconds for all ongoing requests to 'proxy' to be completed
      restart(proxy)  # kill 'proxy' and restart it

See https://github.com/CodisLabs/jodis/pull/60 for further details.