mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
allow retry at the cluster level to work; remove retry for server/server.go Command.setupNetworking() that retries a single gossip node
This commit is contained in:
parent
ed12f3585c
commit
b1a0e0ae8b
1 changed files with 2 additions and 17 deletions
|
|
@ -56,7 +56,6 @@ import (
|
|||
"github.com/pilosa/pilosa/v2/stats"
|
||||
"github.com/pilosa/pilosa/v2/statsd"
|
||||
"github.com/pilosa/pilosa/v2/syswrap"
|
||||
"github.com/pilosa/pilosa/v2/test/port"
|
||||
"github.com/pilosa/pilosa/v2/testhook"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
|
@ -503,22 +502,8 @@ func (m *Command) setupNetworking() error {
|
|||
// get the host portion of addr to use for binding
|
||||
gossipHost := m.listenURI.Host
|
||||
m.gossipTransport, err = gossip.NewTransport(gossipHost, gossipPort, m.logger.Logger())
|
||||
if err != nil && gossipPort >= 32768 {
|
||||
// In testing, we sometimes try to reuse an ephemeral port.
|
||||
// Which probably works. If it doesn't, this test will take
|
||||
// about a minute longer because we'll come back in from a
|
||||
// new port. See also the gossip config in gossip/gossip.go.
|
||||
// TODO: Maybe make that more configurable here.
|
||||
m.logger.Printf("ephemeral port %d already occupied, switching to :0 (%v)", gossipPort, err)
|
||||
if err := port.GetPort(func(p int) error {
|
||||
gossipPort = p
|
||||
m.Config.Gossip.Port = fmt.Sprintf(":%d", gossipPort)
|
||||
m.gossipTransport, err = gossip.NewTransport(gossipHost, gossipPort, m.logger.Logger())
|
||||
return err
|
||||
}, 10); err != nil {
|
||||
return errors.Wrap(err, "getting transport")
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "getting transport")
|
||||
}
|
||||
|
||||
gossipMemberSet, err := gossip.NewMemberSet(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue