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

[WIP] implement buffer listener to start serve http after boot finished #927

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

Conversation

gorilla001
Copy link

  • 启动后阻塞http请求至调度器完成第一次task reconcile之后才开始处理

case LeadershipFollower:
log.Warnln("became follower, closing all agents ...")
m.clusterMaster.CloseAllAgents()
m.apiserver.UpdateLeader(m.leader)

close(m.activator) // notify apiserver to serve
}
Copy link
Contributor

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 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

测试下这里可能panic

return &muxListener{
pool: m.poolMole,
pool: m.poolMole,
activate: activate,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

mole协议应该不需要 activator

@@ -29,6 +29,8 @@ type Manager struct {
electRootPath string
leader string
myid string
activator chan struct{}
notify chan struct{}
Copy link
Contributor

Choose a reason for hiding this comment

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

notify chan 感觉不需要,直接传递 activator chan 好了

@bbklab
Copy link
Contributor

bbklab commented Sep 12, 2017

need rebase

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.

None yet

2 participants