Skip to content

2 fill() problems #780

Closed
Closed
@Dieterbe

Description

I noticed two things with fill():

  1. filling without aggregation function

using influxdb-cli:

graphite> select time, value from stats.gauges.dfvimeo.last_good_epoch group by time(60s) fill(null) where time > 1406230367s and time < 1406231207s
┌───────────────┬─────────────────┬──────────┐
│ time          │ sequence_number │ value    │
├───────────────┼─────────────────┼──────────┤
│ 1406231207000 │ 1               │ 10885813 │
│ 1406231147000 │ 1               │ 10885813 │
│ 1406231087000 │ 1               │ 10885813 │
│ 1406231027000 │ 1               │ 10885813 │
│ 1406230967000 │ 1               │ 10885813 │
│ 1406230367000 │ 1               │ 10885813 │
└───────────────┴─────────────────┴──────────┘
Query took  2 ms

there is a 600 second gap between the last and second-to-last point, so the gap is within the data range. Using where time > 1406230368s to exclude 406230367000 creates the empty range at the end, which is nothing new given #426 , so this a different case, also evidenced by the fact that selecting max(value) activates the filling (see below).
So consider this a tentative feature request to make the fill work without aggregation function. there is some ambiguity about what should happen when the input dataset has too many points per given group-interval. In that case I would assume that its the users' responsability to assure there's a datapoint per group-by-interval, and if the user has too many, we can just use the first or last. Of course, all of this might be too much of a hassle, in which case I'm fine with not executing on this feature request and just using whatever is the most lightweight aggregation function (first() ?), even when no aggregation should strictly be needed.

  1. bad values returned
    continuing.... let's add max() around the value:
graphite> select time, max(value) from stats.gauges.dfvimeo.last_good_epoch group by time(60s) fill(null) where time > 1406230367s and time < 1406231207s
┌───────────────┬──────────────────────────┐
│ time          │ max                      │
├───────────────┼──────────────────────────┤
│ 1406231160000 │ 10885813                 │
│ 1406231100000 │ 10885813                 │
│ 1406231040000 │ 10885813                 │
│ 1406230980000 │ 10885813                 │
│ 1406230920000 │ 10885813                 │
│ 1406230860000 │ -1.7976931348623157e+308 │
│ 1406230800000 │ -1.7976931348623157e+308 │
│ 1406230740000 │ -1.7976931348623157e+308 │
│ 1406230680000 │ -1.7976931348623157e+308 │
│ 1406230620000 │ -1.7976931348623157e+308 │
│ 1406230560000 │ -1.7976931348623157e+308 │
│ 1406230500000 │ -1.7976931348623157e+308 │
│ 1406230440000 │ -1.7976931348623157e+308 │
│ 1406230380000 │ -1.7976931348623157e+308 │
│ 1406230320000 │ 10885813                 │
└───────────────┴──────────────────────────┘
Query took  3 ms

now the filling activates, but we get bogus values?

confirm with different fill value:

graphite> select time, max(value) from stats.gauges.dfvimeo.last_good_epoch group by time(60s) fill(10) where time > 1406230367s and time < 1406231207s
┌───────────────┬──────────────────────────┐
│ time          │ max                      │
├───────────────┼──────────────────────────┤
│ 1406231160000 │ 10885813                 │
│ 1406231100000 │ 10885813                 │
│ 1406231040000 │ 10885813                 │
│ 1406230980000 │ 10885813                 │
│ 1406230920000 │ 10885813                 │
│ 1406230860000 │ -1.7976931348623157e+308 │
│ 1406230800000 │ -1.7976931348623157e+308 │
│ 1406230740000 │ -1.7976931348623157e+308 │
│ 1406230680000 │ -1.7976931348623157e+308 │
│ 1406230620000 │ -1.7976931348623157e+308 │
│ 1406230560000 │ -1.7976931348623157e+308 │
│ 1406230500000 │ -1.7976931348623157e+308 │
│ 1406230440000 │ -1.7976931348623157e+308 │
│ 1406230380000 │ -1.7976931348623157e+308 │
│ 1406230320000 │ 10885813                 │
└───────────────┴──────────────────────────┘
Query took  3 ms
graphite> 

just to make sure influxdb-cli is not doing something funky, here's the http sniff to influxdb, which confirms influx returns the values.

####
T 127.0.0.1:51606 -> 127.0.0.1:8086 [AP]
GET /db/graphite/series?u=root&p=root&q=select%20time%2C%20max(value)%20from%20stats.gauges.dfvimeo.last_good_epoch%20group%20by%20time(60s)%20fill(10)%20where%20time%20%3E%201406230367s%20and%20time%20%3C%201406231207s&time_precision=m&chunked=false HTTP/1.1.
host: dfvimeographite1:8086.
accept: application/json.
Connection: keep-alive.
.

##
T 127.0.0.1:8086 -> 127.0.0.1:51606 [AP]
HTTP/1.1 200 OK.
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept.
Access-Control-Allow-Methods: GET, POST, PUT, DELETE.
Access-Control-Allow-Origin: *.
Access-Control-Max-Age: 2592000.
Content-Type: application/json.
X-Influxdb-Version: InfluxDB vdev (git: 78b682f) (leveldb: 1.15).
Date: Thu, 24 Jul 2014 20:51:36 GMT.
Content-Length: 638.
.
[{"name":"stats.gauges.dfvimeo.last_good_epoch","columns":["time","max"],"points":[[1406231160000,1.0885813e+07],[1406231100000,1.0885813e+07],[1406231040000,1.0885813e+07],[1406230980000,1.0885813e+07],[1406230920000,1.0885813e+07],[1406230860000,-1.7976931348623157e+308],[1406230800000,-1.7976931348623157e+308],[1406230740000,-1.7976931348623157e+308],[1406230680000,-1.7976931348623157e+308],[1406230620000,-1.7976931348623157e+308],[1406230560000,-1.7976931348623157e+308],[1406230500000,-1.7976931348623157e+308],[1406230440000,-1.7976931348623157e+308],[1406230380000,-1.7976931348623157e+308],[1406230320000,1.0885813e+07]]}]

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions