Merge pull request #620 from freeformz/use_interval
Use the heartbeat interval as the timeoutpull/623/head
commit
b7fc984711
|
@ -171,8 +171,9 @@ func (self *ClusterServer) getHeartbeatResponse(responseChan <-chan *protocol.Re
|
|||
if *response.Type != protocol.Response_HEARTBEAT {
|
||||
return fmt.Errorf("Server returned a non heartbeat response")
|
||||
}
|
||||
case <-time.After(HEARTBEAT_TIMEOUT):
|
||||
return fmt.Errorf("Server failed to return heartbeat in 100ms: %d", self.Id)
|
||||
|
||||
case <-time.After(self.HeartbeatInterval):
|
||||
return fmt.Errorf("Server failed to return heartbeat in %s: %d", self.HeartbeatInterval, self.Id)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -67,7 +67,7 @@ dir = "/tmp/influxdb/test/1/db"
|
|||
|
||||
protobuf_port = 60502
|
||||
protobuf_timeout = "1200ms" # the write timeout on the protobuf conn any duration parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "100ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "1000ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_min_backoff = "100ms" # the minimum backoff after a failed heartbeat attempt
|
||||
protobuf_max_backoff = "100ms" # the maxmimum backoff after a failed heartbeat attempt
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ seed-servers = ["localhost:60501"]
|
|||
|
||||
protobuf_port = 60508
|
||||
protobuf_timeout = "1200ms" # the write timeout on the protobuf conn any duration parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "100ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "1000ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_min_backoff = "100ms" # the minimum backoff after a failed heartbeat attempt
|
||||
protobuf_max_backoff = "100ms" # the maxmimum backoff after a failed heartbeat attempt
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ seed-servers = ["localhost:60501"]
|
|||
|
||||
protobuf_port = 60512
|
||||
protobuf_timeout = "1200ms" # the write timeout on the protobuf conn any duration parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "100ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "1000ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_min_backoff = "100ms" # the minimum backoff after a failed heartbeat attempt
|
||||
protobuf_max_backoff = "100ms" # the maxmimum backoff after a failed heartbeat attempt
|
||||
|
||||
|
|
Loading…
Reference in New Issue