You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var one = stream
|from()
.measurement('one')
var two = stream
|from()
.measurement('two')
one
|union(two)
.rename('input')
@myUDF()
|log()
It works perfectly on recorded data provided the record uses a query to select historical data. However calling kapacitor record stream does not return and no data is recorded even if a point is inserted into either one or two.
Further, enabling the task produces no log output until x points are added to either one or two. x is about 6, but I couldn't see consistent behaviour to determine a pattern. From there, every time a point is added to either one or two, the point x entries old gets processed. That is, it acts like a FIFO with x elements.
I could find no explanation of this behaviour in the docs, in the source code or via Google searches.
I finally traced it down to the UnionNode by looking at the DOT output of kapacitor show my_task:
This seems to indicate that the FromNodes are processing the points immediately, but the UnionNode is 6 points behind. Sure enough, if I remove the UnionNode and connect one of the FromNode's directly, and then add a point to that FromNode, it is processed immediately:
@hraftery I also discovered this and started working on a fix (see #1038) but I ran into some significant road blocks. I am transitioning back into a bug fix phase at the moment so I'll take another stab at this.
After 4 hours on this one, I concede defeat.
Consider this TICKscript:
It works perfectly on recorded data provided the record uses a query to select historical data. However calling
kapacitor record stream
does not return and no data is recorded even if a point is inserted into eitherone
ortwo
.Further, enabling the task produces no log output until
x
points are added to eitherone
ortwo
.x
is about 6, but I couldn't see consistent behaviour to determine a pattern. From there, every time a point is added to eitherone
ortwo
, the pointx
entries old gets processed. That is, it acts like a FIFO withx
elements.I could find no explanation of this behaviour in the docs, in the source code or via Google searches.
I finally traced it down to the
UnionNode
by looking at the DOT output ofkapacitor show my_task
:This seems to indicate that the
FromNodes
are processing the points immediately, but theUnionNode
is 6 points behind. Sure enough, if I remove theUnionNode
and connect one of theFromNode
's directly, and then add a point to thatFromNode
, it is processed immediately:Is there an explanation for this mysterious behaviour. Can it be disabled so that points are processed immediately?
URL for relevant page?
https://docs.influxdata.com/kapacitor/v1.1//nodes/union_node/
What products and version are you using?
InfluxDB 1.1.1
Kapacitor 1.1.1
Where did you look before opening the issue?
https://docs.influxdata.com/kapacitor/v1.1//nodes/union_node/
https://github.com/influxdata/kapacitor/blob/master/pipeline/union.go
#361
The text was updated successfully, but these errors were encountered: