Merge pull request #620 from freeformz/use_interval

Use the heartbeat interval as the timeout
pull/623/head
John Shahid 2014-06-04 13:53:18 -04:00
commit b7fc984711
4 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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