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

Zookeeper graceful shutdown #17

Merged
merged 7 commits into from
Apr 27, 2016

Conversation

sunnights
Copy link
Collaborator

ZooKeeper支持通过心跳开关来改变服务工作状态
修改相关文档

@sunnights sunnights force-pushed the zookeeper-graceful-shutdown branch 2 times, most recently from 20053e2 to fa1b81c Compare April 26, 2016 04:40
fix: 移除无用consul开关
for (URL u : getRegisteredServiceUrls()) {
String info = u.toFullStr();

String unavaliabeServerNodePath = toUnavaliableServerNodePath(u);
Copy link
Collaborator

Choose a reason for hiding this comment

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

available拼错了

Copy link
Collaborator

Choose a reason for hiding this comment

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

available和unavailable做的内容是类似的,是否用参数区分,避免代码重复?

@qdaxb
Copy link
Collaborator

qdaxb commented Apr 26, 2016

需要补充单元测试,并且评估一下服务上下线对zk集群性能的影响

return nodeChildsToUrls(parentPath, currentChilds);
} catch (Throwable e) {
throw new MotanFrameworkException(String.format("Failed to discover %s from zookeeper(%s), cause: %s", url, getUrl(), e.getMessage()));
}
}

@Override
protected void doAvailable(URL url) {
if (url == null) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

registeredServiceUrls有一个bug:
假如当前有3个unavailable url
当先调用available(url1)时,url1正常工作
再调用available(null)时,会再次重置url1

@qdaxb
Copy link
Collaborator

qdaxb commented Apr 26, 2016

reference to #5

@qdaxb qdaxb merged commit 07b1048 into weibocom:master Apr 27, 2016
@qdaxb qdaxb added the feature label May 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants