Added delay to allow cooridinator a head start in launch on multi node clusters.

considered using Cluster.Disabled to identify if pilosa was stand alone but settled
on using an empty gossip seeds list
This commit is contained in:
Todd Gruben 2020-04-09 13:11:13 -05:00
parent bdfad719df
commit e7bbc3a0a8

View file

@ -145,6 +145,13 @@ func (m *Command) Start() (err error) {
if err != nil {
return errors.Wrap(err, "setting up server")
}
if !m.API.Node().IsCoordinator {
// hack to give coordinator a head start
// TODO https://github.com/molecula/pilosa/issues/266
if len(m.Config.Gossip.Seeds) > 0 {
time.Sleep(5 * time.Second)
}
}
// SetupNetworking
err = m.setupNetworking()