CodisLabs / jodis

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

Jedis.close() Could not return the resource to the pool #24

Closed jameBoy closed 7 years ago

jameBoy commented 8 years ago

我这边使用的jodis是0.3.0版本 jedis是2.8版本。因为2.8版本直接使用jedis.close()就可以了return pool里 。

但是我这边测试调用codis不支持的命令,正常我应该这样: try { logger.info("keys---"+jedisClient.keys("*")); }catch (Exception e){ logger.error("jedis error"); }finally { if (jedisClient != null){ jedisClient.close(); } }

_These commands are disallowed in codis proxy, if you use them, proxy will close the connection to warn you. _

是不是说我这边不需要处理?不需要close? 那么这样的话 我如何写一个通用的base方法来统一处理呢?

Apache9 commented 8 years ago

你是说操作出错之后close也会出错?

jameBoy commented 8 years ago

是的