Skip to content

Commit 20ad165

Browse files
committed
Merge branch 'main' into fix/liaohj
2 parents b1981d3 + d343a00 commit 20ad165

File tree

141 files changed

+9235
-3197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+9235
-3197
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ version.h
161161
geos_c.h
162162
source/libs/parser/src/sql.c
163163
include/common/ttokenauto.h
164-
164+
!packaging/smokeTest/pytest_require.txt

Jenkinsfile2

+138-53
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import hudson.model.Result
22
import hudson.model.*;
33
import jenkins.model.CauseOfInterruption
4-
docs_only=0
54
node {
65
}
6+
file_zh_changed = ''
7+
file_en_changed = ''
8+
file_no_doc_changed = ''
79
def abortPreviousBuilds() {
810
def currentJobName = env.JOB_NAME
911
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
@@ -29,7 +31,7 @@ def abort_previous(){
2931
if (buildNumber > 1) milestone(buildNumber - 1)
3032
milestone(buildNumber)
3133
}
32-
def check_docs() {
34+
def check_docs(){
3335
if (env.CHANGE_URL =~ /\/TDengine\//) {
3436
sh '''
3537
hostname
@@ -40,39 +42,94 @@ def check_docs() {
4042
cd ${WKC}
4143
git reset --hard
4244
git clean -f
43-
rm -rf examples/rust/
4445
git remote prune origin
4546
git fetch
46-
'''
47-
script {
48-
sh '''
49-
cd ${WKC}
50-
git checkout ''' + env.CHANGE_TARGET + '''
51-
'''
52-
}
53-
sh '''
54-
cd ${WKC}
55-
git remote prune origin
47+
git checkout ''' + env.CHANGE_TARGET + '''
5648
git pull >/dev/null
5749
git fetch origin +refs/pull/${CHANGE_ID}/merge
58-
git checkout -qf FETCH_HEAD
50+
git checkout -qf FETCH_HEAD
5951
'''
60-
def file_changed = sh (
52+
53+
file_zh_changed = sh (
6154
script: '''
6255
cd ${WKC}
63-
git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD ${CHANGE_TARGET}`|grep -v "^docs/en/"|grep -v "^docs/zh/" || :
56+
git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD ${CHANGE_TARGET}`|grep "^docs/zh/" || :
57+
''',
58+
returnStdout: true
59+
)
60+
61+
file_en_changed = sh (
62+
script: '''
63+
cd ${WKC}
64+
git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD ${CHANGE_TARGET}`|grep "^docs/en/" || :
65+
''',
66+
returnStdout: true
67+
)
68+
69+
file_no_doc_changed = sh (
70+
script: '''
71+
cd ${WKC}
72+
git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD ${CHANGE_TARGET}`|grep -v "^docs/en/"|grep -v "^docs/zh/"|grep -v "*.md" || :
6473
''',
6574
returnStdout: true
6675
).trim()
67-
if (file_changed == '') {
68-
echo "docs PR"
69-
docs_only=1
70-
} else {
71-
echo file_changed
72-
}
73-
env.FILE_CHANGED = file_changed
76+
echo "file_zh_changed: ${file_zh_changed}"
77+
echo "file_en_changed: ${file_en_changed}"
78+
echo "file_no_doc_changed: ${file_no_doc_changed}"
79+
}
80+
}
81+
82+
def build_pre_docs(){
83+
if (env.CHANGE_URL =~ /\/TDengine\//) {
84+
sh '''
85+
hostname
86+
date
87+
env
88+
'''
89+
90+
sh '''
91+
cd ${DOC_WKC}/${td_repo}
92+
git reset --hard
93+
git clean -f
94+
git remote prune origin
95+
git fetch
96+
git checkout ''' + env.CHANGE_TARGET + '''
97+
git pull >/dev/null
98+
git fetch origin +refs/pull/${CHANGE_ID}/merge
99+
git checkout -qf FETCH_HEAD
100+
'''
101+
102+
sh '''
103+
cd ${DOC_WKC}/${tools_repo}
104+
git reset --hard
105+
git clean -f
106+
git fetch
107+
git remote prune origin
108+
git checkout ''' + env.CHANGE_TARGET + '''
109+
git pull >/dev/null
110+
'''
74111
}
75112
}
113+
114+
def build_zh_docs(){
115+
sh '''
116+
cd ${DOC_WKC}/${zh_doc_repo}
117+
# git pull
118+
yarn ass local
119+
yarn build
120+
'''
121+
}
122+
123+
def build_en_docs(){
124+
sh '''
125+
cd ${DOC_WKC}/${en_doc_repo}
126+
# git pull
127+
yarn ass local
128+
yarn build
129+
'''
130+
}
131+
132+
76133
def pre_test(){
77134
sh '''
78135
hostname
@@ -153,6 +210,7 @@ def pre_test(){
153210
'''
154211
return 1
155212
}
213+
156214
def pre_test_build_mac() {
157215
sh '''
158216
hostname
@@ -173,6 +231,7 @@ def pre_test_build_mac() {
173231
date
174232
'''
175233
}
234+
176235
def pre_test_win(){
177236
bat '''
178237
hostname
@@ -273,17 +332,8 @@ def pre_test_win(){
273332
cd %WIN_COMMUNITY_ROOT%
274333
git submodule update --init --recursive
275334
'''
276-
bat '''
277-
cd %WIN_CONNECTOR_ROOT%
278-
git branch
279-
git reset --hard
280-
git pull
281-
'''
282-
bat '''
283-
cd %WIN_CONNECTOR_ROOT%
284-
git log -5
285-
'''
286335
}
336+
287337
def pre_test_build_win() {
288338
bat '''
289339
echo "building ..."
@@ -303,16 +353,14 @@ def pre_test_build_win() {
303353
time /t
304354
'''
305355
bat '''
306-
cd %WIN_CONNECTOR_ROOT%
307-
python.exe -m pip install --upgrade pip
308-
python -m pip uninstall taospy -y
309-
python -m pip install taospy==2.7.16
310-
python -m pip uninstall taos-ws-py -y
311-
python -m pip install taos-ws-py==0.3.3
356+
cd %WIN_COMMUNITY_ROOT%/tests/ci
357+
pip3 install taospy==2.7.16
358+
pip3 install taos-ws-py==0.3.3
312359
xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32
313360
'''
314361
return 1
315362
}
363+
316364
def run_win_ctest() {
317365
bat '''
318366
echo "windows ctest ..."
@@ -322,10 +370,10 @@ def run_win_ctest() {
322370
time /t
323371
'''
324372
}
373+
325374
def run_win_test() {
326375
bat '''
327376
echo "windows test ..."
328-
cd %WIN_CONNECTOR_ROOT%
329377
xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32
330378
ls -l C:\\Windows\\System32\\taos.dll
331379
time /t
@@ -343,29 +391,67 @@ pipeline {
343391
WKDIR = '/var/lib/jenkins/workspace'
344392
WK = '/var/lib/jenkins/workspace/TDinternal'
345393
WKC = '/var/lib/jenkins/workspace/TDinternal/community'
346-
WKPY = '/var/lib/jenkins/workspace/taos-connector-python'
394+
DOC_WKC = '/root/doc_ci_work'
395+
td_repo = 'TDengine'
396+
zh_doc_repo = 'docs.taosdata.com'
397+
en_doc_repo = 'docs.tdengine.com'
398+
tools_repo = 'taos-tools'
347399
}
348400
stages {
349-
stage('check') {
401+
stage ('check doc file changed') {
402+
agent{label " slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_52 || slave1_59 || slave1_63 || worker03 || slave215 || slave217 || slave219 || Mac_catalina "}
403+
steps {
404+
check_docs()
405+
}
406+
}
407+
408+
stage ('pre for build docs') {
350409
when {
351-
allOf {
352-
not { expression { env.CHANGE_BRANCH =~ /docs\// }}
353-
}
410+
beforeAgent true
411+
expression { env.CHANGE_BRANCH =~ /(?i)doc.*/ || file_zh_changed != '' || file_en_changed != '' }
412+
}
413+
agent{label "doc_build_0_30"}
414+
steps {
415+
build_pre_docs()
416+
}
417+
}
418+
419+
stage('build Docs') {
420+
when {
421+
beforeAgent true
422+
expression { env.CHANGE_BRANCH =~ /(?i)doc.*/ || file_zh_changed != '' || file_en_changed != '' }
354423
}
355424
parallel {
356-
stage('check docs') {
357-
agent{label " slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_52 || slave1_59 || slave1_63 || worker03 || slave215 || slave217 || slave219 || Mac_catalina "}
425+
stage('build zh docs') {
426+
agent{label "doc_build_0_30"}
427+
when {
428+
expression { file_zh_changed != '' }
429+
}
358430
steps {
359-
check_docs()
431+
build_zh_docs()
360432
}
361433
}
434+
stage('build en docs') {
435+
agent{label "doc_build_0_30"}
436+
when {
437+
expression { file_en_changed != '' }
438+
}
439+
steps {
440+
build_en_docs()
441+
}
442+
}
443+
}
444+
post {
445+
unsuccessful {
446+
error('build docs stage failed, terminating pipeline.')
447+
}
362448
}
363449
}
450+
364451
stage('run test') {
365452
when {
366453
allOf {
367-
not { expression { env.CHANGE_BRANCH =~ /docs\// }}
368-
expression { docs_only == 0 }
454+
not { expression { file_no_doc_changed == '' }}
369455
}
370456
}
371457
parallel {
@@ -375,7 +461,6 @@ pipeline {
375461
WIN_INTERNAL_ROOT="C:\\workspace\\${env.EXECUTOR_NUMBER}\\TDinternal"
376462
WIN_COMMUNITY_ROOT="C:\\workspace\\${env.EXECUTOR_NUMBER}\\TDinternal\\community"
377463
WIN_SYSTEM_TEST_ROOT="C:\\workspace\\${env.EXECUTOR_NUMBER}\\TDinternal\\community\\tests\\system-test"
378-
WIN_CONNECTOR_ROOT="C:\\workspace\\${env.EXECUTOR_NUMBER}\\taos-connector-python"
379464
}
380465
steps {
381466
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
@@ -420,7 +505,7 @@ pipeline {
420505
script {
421506
sh '''
422507
mkdir -p ${WKDIR}/tmp/${BRANCH_NAME}_${BUILD_ID}
423-
echo "''' + env.FILE_CHANGED + '''" > ${WKDIR}/tmp/${BRANCH_NAME}_${BUILD_ID}/docs_changed.txt
508+
echo "''' + file_no_doc_changed + '''" > ${WKDIR}/tmp/${BRANCH_NAME}_${BUILD_ID}/docs_changed.txt
424509
'''
425510
sh '''
426511
cd ${WKC}/tests/parallel_test
@@ -570,4 +655,4 @@ pipeline {
570655
)
571656
}
572657
}
573-
}
658+
}

cmake/cmake.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
IF (DEFINED VERNUMBER)
33
SET(TD_VER_NUMBER ${VERNUMBER})
44
ELSE ()
5-
SET(TD_VER_NUMBER "3.3.4.0.alpha")
5+
SET(TD_VER_NUMBER "3.3.4.3.alpha")
66
ENDIF ()
77

88
IF (DEFINED VERCOMPATIBLE)

docs/en/14-reference/03-taos-sql/10-function.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ TOP(expr, k)
11491149
UNIQUE(expr)
11501150
```
11511151

1152-
**Description**: The values that occur the first time in the specified column. The effect is similar to `distinct` keyword. For a table with composite primary key, only the data with the smallest primary key value is returned.
1152+
**Description**: Return the unique values of this column. The effect is similar to `distinct` keyword. Return the row with the earliest timestamp for duplicate data. For a table with composite primary key, only the data with the smallest primary key value is returned.
11531153

11541154
**Return value type**:Same as the data type of the column being operated upon
11551155

docs/en/28-releases/01-tdengine.md

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ For TDengine 2.x installation packages by version, please visit [here](https://t
2020

2121
import Release from "/components/ReleaseV3";
2222

23+
## 3.3.4.3
24+
25+
<Release type="tdengine" version="3.3.4.3" />
26+
2327
## 3.3.3.0
2428

2529
<Release type="tdengine" version="3.3.3.0" />

docs/zh/06-advanced/03-stream.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,35 @@ PAUSE STREAM [IF EXISTS] stream_name;
228228
RESUME STREAM [IF EXISTS] [IGNORE UNTREATED] stream_name;
229229
```
230230

231-
没有指定 IF EXISTS,如果该 stream 不存在,则报错。如果存在,则恢复流计算。指定了 IF EXISTS,如果 stream 不存在,则返回成功。如果存在,则恢复流计算。如果指定 IGNORE UNTREATED,则恢复流计算时,忽略流计算暂停期间写入的数据。
231+
没有指定 IF EXISTS,如果该 stream 不存在,则报错。如果存在,则恢复流计算。指定了 IF EXISTS,如果 stream 不存在,则返回成功。如果存在,则恢复流计算。如果指定 IGNORE UNTREATED,则恢复流计算时,忽略流计算暂停期间写入的数据。
232+
233+
### 流计算升级故障恢复
234+
235+
升级 TDengine 后,如果流计算不兼容,需要删除流计算,然后重新创建流计算。步骤如下:
236+
237+
1.修改 taos.cfg,添加 disableStream 1
238+
239+
2.重启 taosd。如果启动失败,修改 stream 目录的名称,避免 taosd 启动的时候尝试加载 stream 目录下的流计算数据信息。不使用删除操作避免误操作导致的风险。需要修改的文件夹:$dataDir/vnode/vnode*/tq/stream,$dataDir 指 TDengine 存储数据的目录,在 $dataDir/vnode/ 目录下会有多个类似 vnode1 、vnode2...vnode* 的目录,全部需要修改里面的 tq/stream 目录的名字,改为 tq/stream.bk
240+
241+
3.启动 taos
242+
243+
```sql
244+
drop stream xxxx; ---- xxx 指stream name
245+
flush database stream_source_db; ---- 流计算读取数据的超级表所在的 database
246+
flush database stream_dest_db; ---- 流计算写入数据的超级表所在的 database
247+
```
248+
249+
举例:
250+
251+
```sql
252+
create stream streams1 into test1.streamst as select _wstart, count(a) c1 from test.st interval(1s) ;
253+
drop database streams1;
254+
flush database test;
255+
flush database test1;
256+
```
257+
258+
4.关闭 taosd
259+
260+
5.修改 taos.cfg,去掉 disableStream 1,或将 disableStream 改为 0
261+
262+
6.启动 taosd

docs/zh/07-develop/07-tmq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TDengine 提供了类似于消息队列产品的数据订阅和消费接口。
1616

1717
**注意**
1818
在 TDengine 连接器实现中,对于订阅查询,有以下限制。
19-
- 查询语句限制:订阅查询只能使用 select 语句,不支持其他类型的SQL,如 insert、update 或 delete 等。
19+
- 查询语句限制:订阅查询只能使用 select 语句,并不支持其他类型的SQL,如订阅库,订阅超级表(非 select 方式),insert、update 或 delete 等。
2020
- 原始始数据查询:订阅查询只能查询原始数据,而不能查询聚合或计算结果。
2121
- 时间顺序限制:订阅查询只能按照时间正序查询数据。
2222

0 commit comments

Comments
 (0)