Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jedis影子数据源bug #30

Open
hanxiantao opened this issue Aug 30, 2021 · 1 comment
Open

Jedis影子数据源bug #30

hanxiantao opened this issue Aug 30, 2021 · 1 comment

Comments

@hanxiantao
Copy link

hanxiantao commented Aug 30, 2021

1、影子Server拦截方法缺失

image
拦截JedisPool的构造函数方法为5个,但JedisConstructorInterceptor中if else分支逻辑为6个
缺少拦截该构造函数如下:

  public JedisPool(final GenericObjectPoolConfig poolConfig, final String host, int port,
      final int connectionTimeout, final int soTimeout, final String password, final int database,
      final String clientName)

JedisConstructorInterceptor中已经有该构造函数的判断
image

2、JedisClusterConnectionInterceptor和JedisPoolGetResourceInterceptor的scopeName不统一

image
image
JedisClusterConnectionInterceptor和JedisPoolGetResourceInterceptor的逻辑相同都是根据正常数据源来匹配影子数据源
Jedis客户端执行了JedisSlotBasedConnectionHandler.getConnectionFromSlot后,再调用JedisPool.getResource就会找不到影子数据源的情况

@jsfbetter
Copy link

请教下你用的哪个分支?能编译通过然后进行二次开发的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants