We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go d.nodesproc()
func (d *Discovery) nodesproc() { for { // 中间无退出控制 // 会产生野生goroutine } }
The text was updated successfully, but these errors were encountered:
这里貌似没有做管理 goroutine 生命周期的工作
Sorry, something went wrong.
这里可以参考 micro-stacks/discov 的设计。
按照我的理解:自发现就是持续进行的工作,就应该和main的生命周期一致才对吧?要不然怎么覆盖discovery的扩容和缩容场景?但是其中有一段代码不是很理解:
discovery/discovery/syncup.go
Lines 127 to 132 in 1e12d5c
在收到节点变更通知,但是其中为空就会导致自发现退出,那自发现就不用继续进行了吗?虽然这个情况并不常见,但一旦出现那么discovery 是不是就不能正常感知节点变化了?
No branches or pull requests
go d.nodesproc()
func (d *Discovery) nodesproc() {
for {
// 中间无退出控制
// 会产生野生goroutine
}
}
The text was updated successfully, but these errors were encountered: