Merge pull request #4061 from influxdb/opentsdb_eof2

Cleanly terminate openTSDB connection on EOF
pull/4062/head
Philip O'Toole 2015-09-09 13:17:49 -07:00
commit e467226b2e
2 changed files with 6 additions and 1 deletions

View File

@ -51,6 +51,7 @@ With this release InfluxDB is moving to Go 1.5.
- [#3881](https://github.com/influxdb/influxdb/issues/3881): panic: runtime error: invalid memory address or nil pointer dereference
- [#3926](https://github.com/influxdb/influxdb/issues/3926): First or last value of `GROUP BY time(x)` is often null. Fixed by [#4038](https://github.com/influxdb/influxdb/pull/4038)
- [#4053](https://github.com/influxdb/influxdb/pull/4053): Prohibit dropping default retention policy.
- [#4060](https://github.com/influxdb/influxdb/pull/4060): Don't log EOF error in openTSDB input.
## v0.9.3 [2015-08-26]

View File

@ -31,6 +31,7 @@ const (
statTelnetConnectionsHandled = "tl_connections_handled"
statTelnetPointsReceived = "tl_points_rx"
statTelnetBytesReceived = "tl_bytes_rx"
statTelnetReadError = "tl_read_err"
statBatchesTrasmitted = "batches_tx"
statPointsTransmitted = "points_tx"
statBatchesTransmitFail = "batches_tx_fail"
@ -244,7 +245,10 @@ func (s *Service) handleTelnetConn(conn net.Conn) {
for {
line, err := r.ReadLine()
if err != nil {
s.Logger.Println("error reading from openTSDB connection", err.Error())
if err != io.EOF {
s.statMap.Add(statTelnetReadError, 1)
s.Logger.Println("error reading from openTSDB connection", err.Error())
}
return
}
s.statMap.Add(statTelnetPointsReceived, 1)