Skip to content

fix: 修复broker集群宕机情况下,客户端刷新连接时,若各连接抛出异常时机不一致,则仍未抛出异常的连接uri无法加入unHealth… #1

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fanpipi
Copy link

@fanpipi fanpipi commented Jul 10, 2024

版本:
1.1.5

部署情况:
三节点的Gossip广播模式集群部署。

缺陷现象描述:
broker三节点关停一段时间后启动,存在部分客户端无法全部自动注册上三个broker节点。

异常类:
com.alibaba.rsocket.loadbalance.LoadBalancedRSocket

问题原因:
在所有节点关停后,客户端中维持的最后一条活跃连接触发onRSocketClosed,并将原始三节点uri进行refreshRsockets。这三条链接在connect或healthcheck阶段中会抛出连接相关异常,进而触发后续的异常处理流程;
但在此链接的异常处理流程执行完成前,若其余连接仍未抛出异常执行对应异常处理流程,则会被异常撤销流程,以至于无法加入unHealthyUriSet。故checkUnhealthyUris方法无法重连此异常链接。
1720589728359

处理思路:
在refreshRsockets方法中对connect及healthcheck阶段的异常进行捕获并不再抛出,返回空流。
1720590425614

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

Successfully merging this pull request may close these issues.

1 participant