Wire server provider for raft layer only on protocol version 3 and above, and update changelog
This commit is contained in:
parent
1dca19384e
commit
0728a04dbb
|
@ -9,6 +9,7 @@ IMPROVEMENTS:
|
||||||
|
|
||||||
* agent: Switched to using a read lock for the agent's RPC dispatcher, which prevents RPC calls from getting serialized. [GH-3376]
|
* agent: Switched to using a read lock for the agent's RPC dispatcher, which prevents RPC calls from getting serialized. [GH-3376]
|
||||||
* build: Upgraded Go version to 1.9. [GH-3428]
|
* build: Upgraded Go version to 1.9. [GH-3428]
|
||||||
|
* server: Consul servers can re-establish quorum after all of them change their IP addresses upon a restart. [GH-1580]
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
|
|
@ -492,12 +492,17 @@ func (s *Server) setupRaft() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var serverAddressProvider raft.ServerAddressProvider = nil
|
||||||
|
if s.config.RaftConfig.ProtocolVersion >= 3 { //ServerAddressProvider needs server ids to work correctly, which is only supported in protocol version 3 or higher
|
||||||
|
serverAddressProvider = s.serverLookup
|
||||||
|
}
|
||||||
|
|
||||||
// Create a transport layer.
|
// Create a transport layer.
|
||||||
transConfig := &raft.NetworkTransportConfig{
|
transConfig := &raft.NetworkTransportConfig{
|
||||||
Stream: s.raftLayer,
|
Stream: s.raftLayer,
|
||||||
MaxPool: 3,
|
MaxPool: 3,
|
||||||
Timeout: 10 * time.Second,
|
Timeout: 10 * time.Second,
|
||||||
ServerAddressProvider: s.serverLookup,
|
ServerAddressProvider: serverAddressProvider,
|
||||||
}
|
}
|
||||||
|
|
||||||
trans := raft.NewNetworkTransportWithConfig(transConfig)
|
trans := raft.NewNetworkTransportWithConfig(transConfig)
|
||||||
|
|
Loading…
Reference in New Issue