-
Notifications
You must be signed in to change notification settings - Fork 94
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
[WIP] implement buffer listener
to start serve http after boot finished
#927
base: master
Are you sure you want to change the base?
Conversation
gorilla001
commented
Sep 7, 2017
- 启动后阻塞http请求至调度器完成第一次task reconcile之后才开始处理
55daf81
to
7061eee
Compare
manager/manager.go
Outdated
case LeadershipFollower: | ||
log.Warnln("became follower, closing all agents ...") | ||
m.clusterMaster.CloseAllAgents() | ||
m.apiserver.UpdateLeader(m.leader) | ||
|
||
close(m.activator) // notify apiserver to serve | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potential panic: close of closed channel ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试下这里可能panic
manager/tcpmux.go
Outdated
return &muxListener{ | ||
pool: m.poolMole, | ||
pool: m.poolMole, | ||
activate: activate, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mole协议应该不需要 activator
manager/manager.go
Outdated
@@ -29,6 +29,8 @@ type Manager struct { | |||
electRootPath string | |||
leader string | |||
myid string | |||
activator chan struct{} | |||
notify chan struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notify chan 感觉不需要,直接传递 activator chan 好了
bb27bd3
to
17b23f5
Compare
17b23f5
to
b7cd475
Compare
need rebase |