taosdata / TDengine

TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, Industrial IoT and DevOps.

Home Page:https://tdengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stream not work in 3.2.3.0

imborntowin opened this issue · comments

如下是建立流计算的语句,trigger 设置的是 at_once

create stream if not exists device_online_stats fill_history 1 trigger at_once into sensor_center_dev_v2.st_stream_device_online_stats 
subtable(concat('t_stream_device_oline_stats_', tbname)) as
select  last(device_model) device_model, last(device_str_id) device_str_id, bool_v, _wstart `start`, _wend `end`, timediff(_wstart,_wend,1m) diff, count(*) `count`
from sensor_center_dev_v2.st_device_property 
where `property_sub_type` = 'ONLINE' 
partition by tbname state_window(bool_v)

大概就是按照状态窗口统计状态时长的作用

在本地测试时,大部分时间都是没问题的,有新数据进来就会自动流计算,但有时候也不会自动计算

放在生产环境,就算了一下历史数据,新数据进来都没触发

和机器性能有关系么?还是我建的流计算有问题?

  • TDengine Version 3.2.3.0

刚才在开发环境,把流计算删了重建(sql 没变),试了很多次,开发环境也不可以了 = =、

刚才在开发环境,把流计算删了重建(sql 没变),试了很多次,开发环境也不可以了 = =、

top -Hp pidof taosd 看看有没有线程/cpu/内存瓶颈

刚才在开发环境,把流计算删了重建(sql 没变),试了很多次,开发环境也不可以了 = =、

top -Hp pidof taosd 看看有没有线程/cpu/内存瓶颈

这样么?我用的是docker运行的单节点

外

好像运存确实比较小,是因为这个导致的窗口关闭么?

如何调整能减少硬件产生的影响呢。

还有我有另外一个流计算,也是at_once,好像没受影响,一直在正常运行:

create stream if not exists factor_value_stats fill_history 1 trigger at_once into 
sensor_center_dev_v2.st_stream_count_for_factor_value subtable(concat('t_stream_count_', tbname)) as 
select count(*) as `count`, factor_id, device_str_id, device_model from sensor_center_dev_v2.st_factor_value 
partition by device_model, device_str_id, factor_id interval(1y)

刚才在开发环境,把流计算删了重建(sql 没变),试了很多次,开发环境也不可以了 = =、

top -Hp pidof taosd 看看有没有线程/cpu/内存瓶颈

大佬帮忙瞅瞅

这个图是流计算在运行时候的状态么,看起来负载很低没有在工作。加微信 a15652223354 具体看下吧