influxdata / influxdata/kapacitor
Points with different time format won't join
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
**OS:** RHEL 6 and 7 x64
**Reproduced in** Kapacitor 1.4 and 1.5
pre-built package (rpm)
The problem may not be specific only to join node, but it is a good case to demonstrate.
Some nodes (probably all InfluxQL nodes) changing time format when applied, from UTC to local, if used without ".usePointTimes" property.
And if i want later, in example, join streams with different time format - they never join, despite tags and time of points actually the same.
Here is sample synthetic script
```
dbrp "telegraf"."autogen"
var s1= batch
|query('SELECT mean("usage_idle") as usage FROM "telegraf"."autogen"."cpu"')
.period(1h)
.every(5s).align()
.groupBy('host','cpu')
|last('usage')
|httpOut('last')
var s2= batch
|query('SELECT mean("usage_idle") as usage FROM "telegraf"."autogen"."cpu"')
.period(10m)
.every(5s).align()
.groupBy('host','cpu')
|last('usage')
|last('last').usePointTimes()
|httpOut('lastp')
s1
|join(s2)
.as('s1','s2')
.tolerance(1m)
|httpOut('join')
```
outputs:
**s1**
```series: [
{
name:"cpu",
tags:{
cpu:"cpu-total",
host:"host-a"
},
columns:[
"time",
"last"
],
values:[
[
"2018-10-26T11:36:10+03:00",
95.12228799820839
]
]
},
...
```
**s2**
```series: [
{
name:"cpu",
tags:{
cpu:"cpu-total",
host:"host-a"
},
columns:[
"time",
"last"
],
values:[
[
"2018-10-26T08:36:10Z",
96.05253758127586
]
]
},
...
```
**join**
```
{
series: null
}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied TICKscript and reproduce the mismatch between the s1 and s2 timestamps before the join. Inspect how equivalent UTC and local-offset times are compared, and consider the issue complete when the reproduced streams join correctly with coverage for this timestamp case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100