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

[Dubbo-5125] 修复provider在网络波动恢复后,无法正确恢复在zookeeper的注册信息 #5125 #5126

Closed
wants to merge 2 commits into from

Conversation

lt964709769
Copy link

What is the purpose of the change

fix #5125

Verifying this change

createEphemeral 捕获到 NodeExistsException 时,判断Ephemeral 节点是否属于当前会话,若不属于,则删除重建此Ephemeral节点

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2019

CLA assistant check
All committers have signed the CLA.

@chickenlj
Copy link
Contributor

chickenlj commented Oct 8, 2019

Also see #5135

Comment on lines +113 to 121
try {
if (!checkEphemeralBelongToCurrentSession(path)) {
deletePath(path);
createEphemeral(path);
}
}catch (Exception e1) {
throw new IllegalStateException(e.getMessage(), e1);
}
} catch (Exception e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this method will get triggered whenever ConnectionState.RECONNECT happens, which can be caused on the root by either connection recover or new session creation. I think it would be better if we can recognize this different condition by checking session id at the entry point of the callback.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you that it is better to do so.

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.

provider在网络波动恢复后,有可能无法正确恢复在zookeeper中的注册信息
4 participants