mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
ping timeout at 15 seconds
this 72 minute timeout setting seems unreasonably long 15 seconds is around the time when a new raft leader should be elected.
This commit is contained in:
parent
2e78a522ab
commit
10414fd81c
|
@ -361,7 +361,7 @@ func (ms *MasterServer) OnPeerUpdate(update *master_pb.ClusterNodeUpdate, startF
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pb.WithMasterClient(false, peerAddress, ms.grpcDialOption, true, func(client master_pb.SeaweedClient) error {
|
pb.WithMasterClient(false, peerAddress, ms.grpcDialOption, true, func(client master_pb.SeaweedClient) error {
|
||||||
ctx, cancel := context.WithTimeout(context.TODO(), time.Minute*72)
|
ctx, cancel := context.WithTimeout(context.TODO(), 15*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if _, err := client.Ping(ctx, &master_pb.PingRequest{Target: string(peerAddress), TargetType: cluster.MasterType}); err != nil {
|
if _, err := client.Ping(ctx, &master_pb.PingRequest{Target: string(peerAddress), TargetType: cluster.MasterType}); err != nil {
|
||||||
glog.V(0).Infof("master %s didn't respond to pings. remove raft server", peerName)
|
glog.V(0).Infof("master %s didn't respond to pings. remove raft server", peerName)
|
||||||
|
|
Loading…
Reference in a new issue