Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream not work in 3.2.3.0 #25585

Open
imborntowin opened this issue Apr 29, 2024 · 5 comments
Open

Stream not work in 3.2.3.0 #25585

imborntowin opened this issue Apr 29, 2024 · 5 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@imborntowin
Copy link

如下是建立流计算的语句,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
@imborntowin imborntowin added the bug Something isn't working label Apr 29, 2024
@imborntowin
Copy link
Author

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

@yu285
Copy link
Contributor

yu285 commented Apr 30, 2024

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

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

@yu285 yu285 self-assigned this Apr 30, 2024
@yu285 yu285 changed the title Stream 流计算不执行 Stream not work in 3.2.3.0 Apr 30, 2024
@yu285 yu285 added help wanted Extra attention is needed and removed bug Something isn't working labels Apr 30, 2024
@imborntowin
Copy link
Author

刚才在开发环境,把流计算删了重建(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)

@imborntowin
Copy link
Author

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

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

大佬帮忙瞅瞅

@yu285
Copy link
Contributor

yu285 commented May 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants