Commit Graph

98 Commits

Author SHA1 Message Date
Haojun Liao dfe32225de chore: merge main. 2025-03-17 14:51:11 +08:00
Haojun Liao ab92886820
fix(stream): reduce the consensus checkpoint id trans. (#30105)
* fix(stream): reduce the consensus checkpoint id trans.

* refactor(stream): add some logs.

* refactor(stream): set the max checkpoint exec time 30min.

* refactor(stream): add checkpoint-consensus trans conflict check.

* refactor(stream): remove unused local variables.

* fix(stream): fix syntax error.

* fix(stream): 1. fix free memory error 2. continue if put result into dst hashmap failed.

* fix issue

* fix issue

* fix(mnd): follower mnode not processes the timer event.

* fix(stream): print correct error msg.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): truncate long subtable name

* fix(stream): add buffer len.

* refactor(stream): update some logs.

* fix issue

* refactor(stream): update some logs.

* refactor(stream): update some logs.

* fix(stream): check return value.

* fix(stream): fix syntax error.

* fix(stream): check return value.

* fix(stream): update the timer check in mnode.

* fix(stream): add restart stage tracking.

* fix(stream): track the start task stage for meta.

* fix(stream): fix error in log.

* refactor(stream): adjust log info.

* fix mem issue

* fix(stream): check the number of required tasks for consensus checkpointId.

* fix(stream): lock the whole start procedure.

* fix(stream): add lock during start all tasks.

* fix(stream): update logs.

* fix(stream): update logs.

* fix(stream): update logs.

* fix(stream): fix dead-lock.

* fix(stream): fix syntax error.

* fix(stream): not drop the scan-history task.

* fix(stream): fix syntax error.

* fix(stream): wait for executor stop before restarting.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): disable some logs.

* fix(stream): reset the start info if no task left.

---------

Co-authored-by: 54liuyao <54liuyao@163.com>
Co-authored-by: Jinqing Kuang <kuangjinqingcn@gmail.com>
2025-03-17 10:20:17 +08:00
liuyao 2de6736160
feat(stream): add new trigger continuous_window_close (#30125)
* opt stream build twa result

* opt force window close memory

* feat(stream):optimize new interval and scan operator

* adj log

* opt code

* opt code

* fill history

* fix issue for fill history

* add ci

* feat(stream): add new stream nonblock interval operator

* adjust code

* use new scan operator

* use new scan operator

* add log

* fix issue

* recover stream scan next function

* fix issue

* fix issue

* fix issue

* ignore disorder data

* fix issue

* fix issue for interval sliding

* fix issue

* fix ci issue

* fix ci issue

* fix ci issue

* add semi && final nonblock interval operator

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* refactor(stream): track the msgId for each upstream tasks.

* fix(stream): fix race condition.

* fix(stream): update the task last msgId when putting into input queue succ.

* fix issue

* fix issue

* put recalculate data to rocksdb

* fix issue

* fix issue

* enh(query)[TD-33071]: add support for saving and restoring tsdbReader scan progress

- Implement functionality to save scan progress during tsdbReader operations
- Enable resuming scans from the last saved position

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* add rec interval check

* enh(stream):add recalculate tasks.

* enh(stream): support the re-calculate the tasks.

* fix issue && do refactor

* do refactor

* fix issue

* fix issue

* update backend opt

* add new interface

* add new session operator

* support blob

* add new session operator

* fix issue

* add rec state for rec task

* fix invalid read

* add new session window

* enh(stream): update the stream tasks backend.

* new session operator

* add pull data

* fix(stream): fix error in expand stream backend.

* fix issue

* fix issue

* fix issue

* merge code

* fix issue

* fix(stream): check for null ptr.

* fix(stream): add more check.

* fix issue

* fix issue

* fix issue

* add debug code

* fix issue

* fix issue

* fix issue

* set rec end flag

* fix(stream): opt re-calculate stream tasks.

* fix issue

* fix issue

* add new operator

* enh(stream): dispatch recalculate block to agg tasks.

* fix issue

* fix issue

* fix(stream): adjust filter.

* fix issue

* refactor

* refactor(stream): adjust the recalculate end block.

* fix issue

* fix(stream): set correct create trigger block.

* fix issue

* fix(stream): fix error in build recalculate end block.

* fix(stream): check null ptr.

* add stream client && fix issue

* fix mem leak

* fix(stream): free msg.

* add stream client

* fix(stream): fix error.

* add stream client && fix issue

* add stream client

* refactor(stream): set the recalculate task complete.

* add wend and group_id for session window dest table

* feat(stream): refactor and set the recalcul agg task complete.

* add cfg for adapter

* fix issue

* add state && event operator

* feat(stream): support fill-history task.

* add new fill operator

* fix(stream): set correct backend when updating fill-history task to recalculate task.

* add new fill operator

* fix(stream): s2025-03-06 11:10:31.272
et ops always open in scan tsdb

* fix(stream):set the correct taskType for sink task.

* new fill operator

* adj stream fill operator

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* adj test

* fix issue

* fix(stream): fix issue

* fix(steam): fix issue

* fix(steam): fix issue

* fix(steam): fix issue

* fix(steam): fix issue

* fix(stream): fix issue

* fix(stream): fix issue

* fix(stream): fix issue

* fix: ut com error

* fix(stream): fix mem leak and adjust operator type check rule

* fix(stream): fix mem leak and adjust test case

* refactor code

* fix(stream): free items.

* fix(stream): free fix memory leak.

* fix(stream): fix syntax error.

* fix: ignore unexpect block

* fix: adjust op type

---------

Co-authored-by: Haojun Liao <hjliao@taosdata.com>
Co-authored-by: Jinqing Kuang <kuangjinqingcn@gmail.com>
Co-authored-by: yihaoDeng <luomoxyz@126.com>
2025-03-14 20:14:01 +08:00
Kaili Xu 13f9bddf3d
feat: support customized taos/taosd (#29736)
* feat: support TDAcoreOS

* chore: cmake options for TD_ACORE

* chore: disable lemon for TD_ACORE

* chore: add lzma2 and msvcregex

* chore: cmake for lzma2

* chore: adapt for TD_ACORE

* chore: adapt strcasecmp for TD_ACORE

* chore: adapt for geos/threadName

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE termio

* chore: refact transComm.h for TD_ACORE

* chore: refact transportInt.h for TD_ACORE

* chore: refact trans.c for TD_ACORE

* chore: refact trpc.h for TD_ACORE

* chore: refact transCli.c/transComm.c/transSvr.c for TD_ACORE

* chore: refact uv.h for TD_ACORE

* chore: refact geosWrapper.h for TD_ACORE

* chore: refact token/builtins/udf for TD_ACORE

* chore: refact rocks for TD_ACORE

* chore: refact tsdbCache.c for TD_ACORE, use LRU cache for last/last_row, not use rocksdb

* chore: refact FAIL to _ERR to solve conflicts for TD_ACORE

* chore: restore lemon.c/lempar.c

* chore: support build lemon for TD_ACORE

* chore: refact trpc and siginfo_t for TD_ACORE

* chore: refact timezone for TD_ACORE

* chore: refact lz4 for TD_ACORE

* chore: refact TD_ACORE to make compile pass

* chore: code optimization for TD_ASTRA

* feat: support run taos with taosd integrated

* feat: support invoke taos shell

* feat: support invoke taos shell

* feat: support invoke taos shell

* chore: code optimization

* chore: fix undefined reference problem os TD_ASTRA

* chore: resolve compile problem for TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix getpid

* chore: fix typo

* chore: set stack size and ajust min pack size for TD_ASTRA

* chore: fix pthread create parameters

* chore: chmod adapt for TD_ASTRA

* chore: fix trans compile problem

* chore: adapt chmod for TD_ASTRA

* chore: byte alignment for TD_ASTRA

* chore: more code for adaption of TD_ASTRA

* chore: more code for adaption of TD_ASTRA

* chore: more code for adaption of TD_ASTRA

* chore: byte alignment for TD_ASTRA

* chore: conditional compile option

* chore: adapt for TD_ASTRA

* chore: adjust taosPId and msvcregex for TD_ASTRA

* chore: log dir separator for wal build name

* chore: fix type of pointer parameter

* chore: fix compile problem of tsdbGetS3Size

* enh: get last ver from wal log for TD_ASTRA

* enh: refact wal meta ver

* enh: refact wal meta ver

* fix: typo of taosUcs4Compare

* enh: process return value of CI

* chore: more code for TD_ASTRA adaption

* chore: return value of taosCloseFile in walMeta.c

* chore: fix compile problem

* chore: fix compile problem of TD_ASTRA

* fix: update macro for tq and stream task

* chore: code optimization for TD_ASTRA

* chore: restore create log and init cfg interface

* chore: restore strncasecmp and strcasecmp

* fix: adjust the field position of SDataBlockInfo

* fix: pragma pack min size

* fix: pragma pack min size

* chore: more code for TD_ASTRA adaption

* fix: type of parameters

* chore: adapt strncasecmp and strcasecmp for TD_ASTRA

* chore: restore interface of init log

* enh: pack push optimization

* fix: taos init cfg

* add astra support

* fix: fetch the value of suid

* chore: switch of  build with udf

* add temp code

* chore: more code for TD_ASTRA adaption

* chore: add macro ERRNO to replace errno

* chore: bytes align for TD_ASTRA

* fix: remove obsolete codes

* enh: support USE_UDF macro

* fix compile error

* fix: resolve redefinition problem

* fix: compile problem of log.cpp

* fix: compile problem of osTimezone

* fix: resolve compile problem of udf

* fix: pragma definition on windows

* fix: ucs4 and stpncpy for TD_ASTRA

* fix: memory align problem for TD_ASTRA

* enh: solve memory leak for TD_ASTRA_RPC

* fix: compile problem of taosSetInt64Aligned

* fix: restore mndSubscribe.c

* fix: scalar for udf

* chore: code adaption for TD_ASTRA

* chore: code optimization for TD_ASTRA

* fix: typo of add definition

* fix: typo of macro in tudf.h

* chore: remove void to make CI pass

* enh: move macro from cmake.platform to cmake.options

* enh: byte align for hash node and error code

* chore: restore the size for lru cache

* enh: restore some code about pack push

* chore: restore the pack push in tmsg.h

* fix: add macro of pack pop for windows

---------

Co-authored-by: yihaoDeng <luomoxyz@126.com>
2025-03-14 13:32:13 +08:00
Shengliang Guan ebcf538c05 Merge branch 'main' into merge/mainto3.0 2024-12-11 20:12:50 +08:00
yihaoDeng ffed7a3c67 remove unused code 2024-12-05 16:28:40 +08:00
54liuyao f452ca47fe delete window state when drop table 2024-11-08 09:42:56 +08:00
54liuyao 3365da365f Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-10-22 10:17:49 +08:00
54liuyao 3e49f40c74 stream twa 2024-10-16 12:16:59 +08:00
Jing Sima cf3db4f1a6 fix:[TD-32184] fix heap use after free. 2024-10-14 11:24:02 +08:00
yihaoDeng 5aeb1ec2ad add interface 2024-10-14 11:00:20 +08:00
54liuyao e53fafc08f Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-09-20 15:31:03 +08:00
Haojun Liao 586826c41f refactor: check return value. 2024-09-18 15:47:15 +08:00
54liuyao 0913802c33 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-08-06 16:25:04 +08:00
54liuyao bdaf0d419e stream interp force window close 2024-08-06 16:14:15 +08:00
yihaoDeng 093e7ef0bb refactor remve backend code 2024-08-05 12:06:01 +08:00
yihaoDeng 0bcfe11e84 refactor remve backend code 2024-08-05 11:55:36 +08:00
54liuyao 063b492f72 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-07-30 15:13:15 +08:00
54liuyao b5f432bd50 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-07-26 16:44:18 +08:00
Yihao Deng 533e3f0da6 refactor tq backend 2024-07-23 07:40:00 +00:00
54liuyao 113cb57326 adj stream operator result 2024-07-17 19:35:35 +08:00
54liuyao 6c84d926ab Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-07-12 11:04:44 +08:00
54liuyao 1c9011e820 stream time slice 2024-07-12 11:03:45 +08:00
Yihao Deng 52a8082622 refactor backend 2024-07-05 03:40:19 +00:00
Yihao Deng ca1562a990 add self check 2024-07-02 08:23:56 +00:00
Yihao Deng 33aef6ddc5 add self check info 2024-06-25 07:12:09 +00:00
Yihao Deng 7cab27110a add self check info 2024-06-24 12:26:10 +00:00
Haojun Liao 2cb9644471 fix(stream): update the checkpoint info only when the status is normal. 2024-06-21 09:23:29 +08:00
Haojun Liao 3baa4169e6 Merge branch '3.0' into fix/3_liaohj 2024-05-20 10:31:53 +08:00
Yihao Deng a7b434075b opt checkpoint 2024-05-16 20:16:59 +08:00
Haojun Liao 6898eba6ed fix(stream): expand stream tasks are divided into two phase, the first is to build stream task and then expand stream task before start stream tasks. 2024-05-14 14:34:31 +08:00
Haojun Liao 7f93ec2c53 fix(stream): update the checkpoint info for followers, and some internal refactor. 2024-05-11 09:37:02 +08:00
Yihao Deng 97aadd3aa7 avoid invalid read 2024-04-29 03:17:33 +00:00
yihaoDeng b3c18c31da add test case to stream backend 2024-02-27 12:19:37 +00:00
yihaoDeng e41e10bf35 add stream backend test 2024-02-26 11:51:46 +00:00
yihaoDeng c54e4aeaad add test case 2024-02-23 09:30:53 +00:00
54liuyao ea9353b9fd merge 3.0 2024-02-04 16:04:23 +08:00
Yihao Deng 1c28f53525 refactor stream code 2024-01-08 08:28:00 +00:00
yihaoDeng 547d797a26 fix stream backend crash when transfer 2023-12-16 15:05:27 +08:00
yihaoDeng 6416a6153a Merge branch '3.0' into enh/refactorBackend 2023-11-24 16:29:09 +08:00
yihaoDeng 20de2f3cb5 Merge branch '3.0' into enh/refactorBackend 2023-11-17 17:15:14 +08:00
yihaoDeng f5ef2e727f fix stream backend convert 2023-11-16 14:41:04 +08:00
yihaoDeng 4476e46a5f rm dup data 2023-11-14 17:43:13 +08:00
yihaoDeng 4104840cea Merge branch '3.0' into enh/refactorBackend 2023-11-13 18:07:38 +08:00
liuyao 37c102a115 Merge branch '3.0' of https://github.com/taosdata/TDengine into feat/TD-21898 2023-11-13 16:06:17 +08:00
yihaoDeng de7f2a2d1a Merge branch '3.0' into enh/refactorBackend 2023-11-13 11:11:28 +08:00
Haojun Liao af08a189c1 fix(stream): disable concurrently restart stream tasks. 2023-11-11 15:40:10 +08:00
yihaoDeng a3fdb6dd59 Merge branch '3.0' into enh/refactorBackend 2023-11-10 16:06:08 +08:00
yihaoDeng 5f9b922a04 support s3 2023-11-09 20:15:08 +08:00
yihaoDeng dd2252598e upload by rsync 2023-11-09 17:39:34 +08:00