From d31fd0ad33bf6066bc9433820d7e7fa7a9e5deeb Mon Sep 17 00:00:00 2001
From: sheyanjie-qq <249478495@qq.com>
Date: Fri, 21 Mar 2025 11:32:07 +0800
Subject: [PATCH 01/26] update grafana docker compose cfg
---
docs/en/10-third-party/03-visual/01-grafana.md | 14 +++++++++++---
docs/zh/10-third-party/03-visual/01-grafana.mdx | 14 +++++++++++---
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/docs/en/10-third-party/03-visual/01-grafana.md b/docs/en/10-third-party/03-visual/01-grafana.md
index 8a503b4195..1c4d0e36d0 100644
--- a/docs/en/10-third-party/03-visual/01-grafana.md
+++ b/docs/en/10-third-party/03-visual/01-grafana.md
@@ -151,15 +151,22 @@ Using docker-compose, configure Grafana Provisioning for automated setup, and ex
services:
tdengine:
- image: tdengine/tdengine:3.3.0.0
+ image: tdengine/tdengine:latest
+ container_name: tdengine
+ hostname: tdengine
environment:
TAOS_FQDN: tdengine
+ MONITOR_FQDN: tdengine
+ EXPLORER_CLUSTER: http://tdengine:6041
+ TAOS_KEEPER_TDENGINE_HOST: tdengine
volumes:
- tdengine-data:/var/lib/taos/
+ ports:
+ - 6060:6060
grafana:
- image: grafana/grafana:9.3.6
+ image: grafana/grafana:latest
volumes:
- - ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml
+ - ./tdengine.yml:/etc/grafana/provisioning/tdengine.yml
- grafana-data:/var/lib/grafana
environment:
# install tdengine plugin at start
@@ -169,6 +176,7 @@ Using docker-compose, configure Grafana Provisioning for automated setup, and ex
TDENGINE_BASIC_AUTH: "cm9vdDp0YmFzZTEyNQ=="
ports:
- 3000:3000
+
volumes:
grafana-data:
tdengine-data:
diff --git a/docs/zh/10-third-party/03-visual/01-grafana.mdx b/docs/zh/10-third-party/03-visual/01-grafana.mdx
index 38c47672b8..ac80103abe 100644
--- a/docs/zh/10-third-party/03-visual/01-grafana.mdx
+++ b/docs/zh/10-third-party/03-visual/01-grafana.mdx
@@ -138,15 +138,22 @@ docker run -d \
services:
tdengine:
- image: tdengine/tdengine:3.3.0.0
+ image: tdengine/tdengine:latest
+ container_name: tdengine
+ hostname: tdengine
environment:
TAOS_FQDN: tdengine
+ MONITOR_FQDN: tdengine
+ EXPLORER_CLUSTER: http://tdengine:6041
+ TAOS_KEEPER_TDENGINE_HOST: tdengine
volumes:
- tdengine-data:/var/lib/taos/
+ ports:
+ - 6060:6060
grafana:
- image: grafana/grafana:9.3.6
+ image: grafana/grafana:latest
volumes:
- - ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml
+ - ./tdengine.yml:/etc/grafana/provisioning/tdengine.yml
- grafana-data:/var/lib/grafana
environment:
# install tdengine plugin at start
@@ -156,6 +163,7 @@ docker run -d \
TDENGINE_BASIC_AUTH: "cm9vdDp0YmFzZTEyNQ=="
ports:
- 3000:3000
+
volumes:
grafana-data:
tdengine-data:
From ec7177cb7df38e29826ed372bd7084f4065b1749 Mon Sep 17 00:00:00 2001
From: Zhixiao Bao <62235797+xiao-77@users.noreply.github.com>
Date: Fri, 21 Mar 2025 14:50:41 +0800
Subject: [PATCH 02/26] fix: correct numberFileset counting cause S3 retention
happened while compact. (#30282)
---
source/dnode/vnode/src/tsdb/tsdbRetention.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/dnode/vnode/src/tsdb/tsdbRetention.c b/source/dnode/vnode/src/tsdb/tsdbRetention.c
index 64a1028029..b3609de4cc 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRetention.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRetention.c
@@ -678,13 +678,13 @@ static int32_t tsdbDoS3Migrate(SRTNer *rtner) {
int32_t r = taosStatFile(fobj->fname, &size, &mtime, NULL);
if (size > chunksize && mtime < rtner->now - tsS3UploadDelaySec) {
if (pCfg->s3Compact && lcn < 0) {
- extern int32_t tsdbAsyncCompact(STsdb * tsdb, const STimeWindow *tw, bool sync);
+ extern int32_t tsdbAsyncCompact(STsdb * tsdb, const STimeWindow *tw, bool sync,bool s3Migrate);
STimeWindow win = {0};
tsdbFidKeyRange(fset->fid, rtner->tsdb->keepCfg.days, rtner->tsdb->keepCfg.precision, &win.skey, &win.ekey);
tsdbInfo("vgId:%d, async compact begin lcn: %d.", TD_VID(rtner->tsdb->pVnode), lcn);
- code = tsdbAsyncCompact(rtner->tsdb, &win, pCfg->sttTrigger == 1);
+ code = tsdbAsyncCompact(rtner->tsdb, &win, pCfg->sttTrigger == 1, true);
tsdbInfo("vgId:%d, async compact end lcn: %d.", TD_VID(rtner->tsdb->pVnode), lcn);
goto _exit;
return code;
From 4d348a66d674d88cd6f0c050239a4b4929fd0b4d Mon Sep 17 00:00:00 2001
From: Haojun Liao
Date: Fri, 21 Mar 2025 22:27:00 +0800
Subject: [PATCH 03/26] Update 09-error-code.md (#30327)
---
docs/zh/14-reference/09-error-code.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/docs/zh/14-reference/09-error-code.md b/docs/zh/14-reference/09-error-code.md
index 7a87e1ddfb..517658482c 100644
--- a/docs/zh/14-reference/09-error-code.md
+++ b/docs/zh/14-reference/09-error-code.md
@@ -591,3 +591,17 @@ description: TDengine 服务端的错误码列表和详细说明
| 0x80006206 | Virtual table not support in Topic | 不支持在订阅中使用虚拟表 | 不在订阅中使用虚拟表 |
| 0x80006207 | Virtual super table query not support origin table from different databases | 虚拟超级表不支持子表的数据源来自不同的数据库 | 确保虚拟超级表的子表的数据源都来自同一个数据库 |
+
+## TDgpt
+
+| 错误码 | 错误描述 | 可能的出错场景或者可能的原因 | 建议用户采取的措施 |
+| ---------- | --------------------- | -------------------------------------------------------------------------------- | ------------------------------ |
+| 0x80000440 | Analysis service response is NULL | 分析服务返回错误 | 检查服务端日志确认返回信息是否正确 |
+| 0x80000441 | Analysis service can't access | 分析服务无法使用 | 检查 anoded 服务是否可用 |
+| 0x80000442 | Analysis algorithm is missing | 未指定分析算法名称 | 增加算法名称 |
+| 0x80000443 | Analysis algorithm not loaded | 指定算法未加载 | 指定算法未加载 |
+| 0x80000444 | Analysis invalid buffer type | 缓存数据格式不对 | 具体查看server端的错误日志 |
+| 0x80000445 | Analysis failed since anode return error | anode 返回错误信息 | 请检查服务端日志确认问题原因 |
+| 0x80000446 | Analysis failed since too many input rows for anode | 输入数据太多 | 减小分析数据输入规模 |
+| 0x80000447 | white-noise data not processed | 白噪声数据不分析 | |
+| 0x80000448 | tdgpt internal error, not processed | anode 出现内部错误 | 具体查看server端的错误日志 |
From fb469935123b05547df04ad7b0172de306fe023f Mon Sep 17 00:00:00 2001
From: WANG MINGMING
Date: Fri, 21 Mar 2025 22:36:37 +0800
Subject: [PATCH 04/26] fix(stream): log level (#30332)
---
source/libs/stream/src/streamBackendRocksdb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c
index a8ca5f15de..3d9ac06a80 100644
--- a/source/libs/stream/src/streamBackendRocksdb.c
+++ b/source/libs/stream/src/streamBackendRocksdb.c
@@ -3128,7 +3128,7 @@ rocksdb_iterator_t* streamStateIterCreate(SStreamState* pState, const char* cfKe
taosMemoryFree(err); \
code = TSDB_CODE_THIRDPARTY_ERROR; \
} else { \
- stInfo("[InternalERR] write streamState str:%s succ to write to %s, rowValLen:%d, ttlValLen:%d, %p", toString, \
+ stDebug("[InternalERR] write streamState str:%s succ to write to %s, rowValLen:%d, ttlValLen:%d, %p", toString, \
funcname, vLen, ttlVLen, wrapper); \
} \
taosMemoryFree(ttlV); \
@@ -4524,7 +4524,7 @@ int32_t streamStatePutBatchOptimize(SStreamState* pState, int32_t cfIdx, rocksdb
int32_t klen = ginitDict[cfIdx].enFunc((void*)key, buf);
ginitDict[cfIdx].toStrFunc((void*)key, toString);
- qInfo("[InternalERR] write cfIdx:%d key:%s vlen:%d", cfIdx, toString, vlen);
+ stDebug("[InternalERR] write cfIdx:%d key:%s vlen:%d", cfIdx, toString, vlen);
char* ttlV = tmpBuf;
int32_t ttlVLen = ginitDict[cfIdx].enValueFunc(dst, size, ttl, &ttlV);
From 083ee928e97346a4a4e4257f2d45fa0412111ca0 Mon Sep 17 00:00:00 2001
From: haoranchen
Date: Sat, 22 Mar 2025 10:59:20 +0800
Subject: [PATCH 05/26] docs:Add Windows support restriction details in
README.md
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5e768b36ea..54f4ff0e9b 100644
--- a/README.md
+++ b/README.md
@@ -80,7 +80,9 @@ For contributing/building/testing TDengine Connectors, please check the followin
# 3. Prerequisites
-At the moment, TDengine server supports running on Linux/Windows/MacOS systems. Any application can also choose the RESTful interface provided by taosAdapter to connect the taosd service. TDengine supports X64/ARM64 CPU, and it will support MIPS64, Alpha64, ARM32, RISC-V and other CPU architectures in the future. Right now we don't support build with cross-compiling environment.
+At the moment, TDengine server supports running on Linux/MacOS systems. Any application can also choose the RESTful interface provided by taosAdapter to connect the taosd service. TDengine supports X64/ARM64 CPU, and it will support MIPS64, Alpha64, ARM32, RISC-V and other CPU architectures in the future. Right now we don't support build with cross-compiling environment.
+
+Starting from version 3.1.0.0, TDengine supports the Windows system exclusively in its Enterprise edition.
If you want to compile taosAdapter or taosKeeper, you need to install Go 1.18 or above.
From 8a1de67039c78dd7218e38ba1d90ad9db0315518 Mon Sep 17 00:00:00 2001
From: haoranchen
Date: Sat, 22 Mar 2025 11:07:27 +0800
Subject: [PATCH 06/26] docs: add Windows support restriction details in
README.md
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 54f4ff0e9b..13b063d6fb 100644
--- a/README.md
+++ b/README.md
@@ -126,7 +126,7 @@ brew install argp-standalone gflags pkgconfig
## 3.3 Prerequisites on Windows
-
+Not available for community edition.
Install required tools on Windows
@@ -211,7 +211,7 @@ If you want to compile taosKeeper, you need to add the `-DBUILD_KEEPER=true` opt
## 4.3 Build on Windows
-
+Not available for community edition.
Detailed steps to build on Windows
@@ -284,7 +284,7 @@ sudo make install
## 6.3 Install on Windows
-
+Not available for community edition.
Detailed steps to install on windows
@@ -359,7 +359,7 @@ If TDengine CLI connects the server successfully, welcome messages and version i
## 7.3 Run TDengine on Windows
-
+Not available for community edition.
Detailed steps to run on windows
From 8bbc3a6f9f930fab2d260652bcbcd2ff564eb123 Mon Sep 17 00:00:00 2001
From: haoranchen
Date: Sat, 22 Mar 2025 11:11:37 +0800
Subject: [PATCH 07/26] docs:add python support restriction details in tests
README.md
---
tests/README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/README.md b/tests/README.md
index df8fbfc655..b3906b8ae9 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -19,6 +19,8 @@ This manual is intended to give developers a comprehensive guidance to test TDen
> - The commands and scripts below are verified on Linux (Ubuntu 18.04/20.04/22.04).
> - [taos-connector-python](https://github.com/taosdata/taos-connector-python) is used by tests written in Python, which requires Python 3.7+.
> - The commands and steps described below are to run the tests on a single host.
+> - The testing framework is currently compatible with Python versions 3.8 through 3.10.
+
# 2. Prerequisites
From 7a288ed388d8252027362073f9deb34a2b29fbd8 Mon Sep 17 00:00:00 2001
From: haoranchen
Date: Sat, 22 Mar 2025 11:17:00 +0800
Subject: [PATCH 08/26] docs: remove content with windows README.md
---
README.md | 71 -------------------------------------------------------
1 file changed, 71 deletions(-)
diff --git a/README.md b/README.md
index 13b063d6fb..4da7730bae 100644
--- a/README.md
+++ b/README.md
@@ -127,13 +127,6 @@ brew install argp-standalone gflags pkgconfig
## 3.3 Prerequisites on Windows
Not available for community edition.
-
-
-Install required tools on Windows
-
-Work in Progress.
-
-
## 3.4 Clone the repo
@@ -212,40 +205,6 @@ If you want to compile taosKeeper, you need to add the `-DBUILD_KEEPER=true` opt
## 4.3 Build on Windows
Not available for community edition.
-
-
-Detailed steps to build on Windows
-
-If you use the Visual Studio 2013, please open a command window by executing "cmd.exe".
-Please specify "amd64" for 64 bits Windows or specify "x86" for 32 bits Windows when you execute vcvarsall.bat.
-
-```cmd
-mkdir debug && cd debug
-"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" < amd64 | x86 >
-cmake .. -G "NMake Makefiles"
-nmake
-```
-
-If you use the Visual Studio 2019 or 2017:
-
-please open a command window by executing "cmd.exe".
-Please specify "x64" for 64 bits Windows or specify "x86" for 32 bits Windows when you execute vcvarsall.bat.
-
-```cmd
-mkdir debug && cd debug
-"c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" < x64 | x86 >
-cmake .. -G "NMake Makefiles"
-nmake
-```
-
-Or, you can simply open a command window by clicking Windows Start -> "Visual Studio < 2019 | 2017 >" folder -> "x64 Native Tools Command Prompt for VS < 2019 | 2017 >" or "x86 Native Tools Command Prompt for VS < 2019 | 2017 >" depends what architecture your Windows is, then execute commands as follows:
-
-```cmd
-mkdir debug && cd debug
-cmake .. -G "NMake Makefiles"
-nmake
-```
-
# 5. Packaging
@@ -285,17 +244,6 @@ sudo make install
## 6.3 Install on Windows
Not available for community edition.
-
-
-Detailed steps to install on windows
-
-After building successfully, TDengine can be installed by:
-
-```cmd
-nmake install
-```
-
-
# 7. Running
@@ -360,25 +308,6 @@ If TDengine CLI connects the server successfully, welcome messages and version i
## 7.3 Run TDengine on Windows
Not available for community edition.
-
-
-Detailed steps to run on windows
-
-You can start TDengine server on Windows platform with below commands:
-
-```cmd
-.\build\bin\taosd.exe -c test\cfg
-```
-
-In another terminal, use the TDengine CLI to connect the server:
-
-```cmd
-.\build\bin\taos.exe -c test\cfg
-```
-
-option "-c test/cfg" specifies the system configuration file directory.
-
-
# 8. Testing
From cf0e4ccdf24c8d3f292b3702743bc45841d81fe3 Mon Sep 17 00:00:00 2001
From: WANG Xu
Date: Sat, 22 Mar 2025 11:36:49 +0800
Subject: [PATCH 09/26] docs: update README.md and add venv suggestion
Signed-off-by: WANG Xu
---
README.md | 4 ++++
tests/README.md | 1 +
2 files changed, 5 insertions(+)
diff --git a/README.md b/README.md
index 4da7730bae..0a52daafab 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,7 @@ brew install argp-standalone gflags pkgconfig
## 3.3 Prerequisites on Windows
+
Not available for community edition.
## 3.4 Clone the repo
@@ -204,6 +205,7 @@ If you want to compile taosKeeper, you need to add the `-DBUILD_KEEPER=true` opt
## 4.3 Build on Windows
+
Not available for community edition.
# 5. Packaging
@@ -243,6 +245,7 @@ sudo make install
## 6.3 Install on Windows
+
Not available for community edition.
# 7. Running
@@ -307,6 +310,7 @@ If TDengine CLI connects the server successfully, welcome messages and version i
## 7.3 Run TDengine on Windows
+
Not available for community edition.
# 8. Testing
diff --git a/tests/README.md b/tests/README.md
index b3906b8ae9..7c5e37e796 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -20,6 +20,7 @@ This manual is intended to give developers a comprehensive guidance to test TDen
> - [taos-connector-python](https://github.com/taosdata/taos-connector-python) is used by tests written in Python, which requires Python 3.7+.
> - The commands and steps described below are to run the tests on a single host.
> - The testing framework is currently compatible with Python versions 3.8 through 3.10.
+> - Vitural Environment is advised when setting up the environment, pease refer to [venv](https://docs.python.org/3/library/venv.html) for details.
# 2. Prerequisites
From ddb4cd6592e4f15a413819a22ab954167dfa6cf0 Mon Sep 17 00:00:00 2001
From: Haojun Liao
Date: Sat, 22 Mar 2025 13:14:01 +0800
Subject: [PATCH 10/26] doc: add error code information about tdgpt (#30338)
* Update 09-error-code.md
* Update 09-error-code.md
* Update 09-error-code.md
---
docs/en/14-reference/09-error-code.md | 14 ++++++++++++++
docs/zh/14-reference/09-error-code.md | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/docs/en/14-reference/09-error-code.md b/docs/en/14-reference/09-error-code.md
index 139f8d38d7..3305eb18eb 100644
--- a/docs/en/14-reference/09-error-code.md
+++ b/docs/en/14-reference/09-error-code.md
@@ -558,6 +558,20 @@ This document details the server error codes that may be encountered when using
| 0x80004017 | Invalid status, please subscribe topic first | tmq status invalidate | Without calling subscribe, directly poll data |
| 0x80004100 | Stream task not exist | The stream computing task does not exist | Check the server-side error logs |
+## TDgpt
+
+| Error Code | Description | Possible Error Scenarios or Reasons | Recommanded Actions for Users |
+| ---------- | --------------------- | -------------------------------------------------------------------------------- | ------------------------------ |
+| 0x80000440 | Analysis service response is NULL | The response content is empty | Check the taosanode.app.log for detailed response information |
+| 0x80000441 | Analysis service can't access | Service is not work currectly, or network is broken | Check the status of taosanode and network status |
+| 0x80000442 | Analysis algorithm is missing | Algorithm used in analysis is not specified | Add the "algo" parameter in forecast function or anomaly_window clause |
+| 0x80000443 | Analysis algorithm not loaded | The specified algorithm is not available | Check for the specified algorithm |
+| 0x80000444 | Analysis invalid buffer type | The bufferred data type is invalid | Check the taosanode.app.log for more details |
+| 0x80000445 | Analysis failed since anode return error | The responses from anode with error message | Check the taosanode.app.log for more details |
+| 0x80000446 | Analysis failed since too many input rows for anode | Input data is too many | Reduce the rows of input data to below than the threshold |
+| 0x80000447 | white-noise data not processed | white noise data is not processed | Ignore the white noise check or use another input data |
+| 0x80000448 | Analysis internal error, not processed | Internal error occurs | Check the taosanode.app.log for more details |
+
## virtual table
diff --git a/docs/zh/14-reference/09-error-code.md b/docs/zh/14-reference/09-error-code.md
index 517658482c..ef585cf706 100644
--- a/docs/zh/14-reference/09-error-code.md
+++ b/docs/zh/14-reference/09-error-code.md
@@ -604,4 +604,4 @@ description: TDengine 服务端的错误码列表和详细说明
| 0x80000445 | Analysis failed since anode return error | anode 返回错误信息 | 请检查服务端日志确认问题原因 |
| 0x80000446 | Analysis failed since too many input rows for anode | 输入数据太多 | 减小分析数据输入规模 |
| 0x80000447 | white-noise data not processed | 白噪声数据不分析 | |
-| 0x80000448 | tdgpt internal error, not processed | anode 出现内部错误 | 具体查看server端的错误日志 |
+| 0x80000448 | Analysis internal error, not processed | anode 出现内部错误 | 具体查看server端的日志 (taosanode.app.log) |
From 53fb1fa63628a33d4b80e8c0b7153af07861240e Mon Sep 17 00:00:00 2001
From: WANG Xu
Date: Sat, 22 Mar 2025 13:36:29 +0800
Subject: [PATCH 11/26] ci: add release build
Signed-off-by: WANG Xu
---
.github/workflows/tdengine-release-build.yml | 114 +++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 .github/workflows/tdengine-release-build.yml
diff --git a/.github/workflows/tdengine-release-build.yml b/.github/workflows/tdengine-release-build.yml
new file mode 100644
index 0000000000..ef708a0ac9
--- /dev/null
+++ b/.github/workflows/tdengine-release-build.yml
@@ -0,0 +1,114 @@
+name: TDengine Release Build
+
+on:
+ push:
+ branches:
+ - 'main'
+ - '3.*'
+ paths-ignore:
+ - 'docs/**'
+ - 'packaging/**'
+ - 'tests/**'
+ - '**/*.md'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ name: Run on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-22.04
+ - macos-14
+
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: 1.18
+
+ - name: Install dependencies on Linux
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt update -y
+ sudo apt install -y \
+ build-essential \
+ cmake \
+ gawk \
+ libgeos-dev \
+ libjansson-dev \
+ liblzma-dev \
+ libsnappy-dev \
+ libssl-dev \
+ libz-dev \
+ pkg-config \
+ zlib1g
+
+ - name: Install dependencies on macOS
+ if: runner.os == 'macOS'
+ run: |
+ brew update
+ brew install \
+ argp-standalone \
+ gawk \
+ gflags \
+ geos \
+ jansson \
+ openssl \
+ pkg-config \
+ snappy \
+ zlib
+
+ - name: Build and install TDengine
+ run: |
+ mkdir debug && cd debug
+ cmake .. -DBUILD_TOOLS=true \
+ -DBUILD_KEEPER=true \
+ -DBUILD_HTTP=false \
+ -DBUILD_TEST=true \
+ -DWEBSOCKET=true \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_DEPENDENCY_TESTS=false
+ make -j 4
+ sudo make install
+ which taosd
+ which taosadapter
+ which taoskeeper
+
+ - name: Statistics ldd
+ run: |
+ find ${{ github.workspace }}/debug/build/lib -type f -name "*.so" -print0 | xargs -0 ldd || true
+ find ${{ github.workspace }}/debug/build/bin -type f -print0 | xargs -0 ldd || true
+
+ - name: Statistics size
+ run: |
+ find ${{ github.workspace }}/debug/build/lib -type f -print0 | xargs -0 ls -lhrS
+ find ${{ github.workspace }}/debug/build/bin -type f -print0 | xargs -0 ls -lhrS
+
+ - name: Start taosd
+ run: |
+ cp /etc/taos/taos.cfg ./
+ sudo echo "supportVnodes 256" >> taos.cfg
+ nohup sudo taosd -c taos.cfg &
+
+ - name: Start taosadapter
+ run: nohup sudo taosadapter &
+
+ - name: Run tests with taosBenchmark
+ run: |
+ taosBenchmark -t 10 -n 10 -y
+ taos -s "select count(*) from test.meters"
+
+ - name: Clean up
+ if: always()
+ run: |
+ if pgrep taosd; then sudo pkill taosd; fi
+ if pgrep taosadapter; then sudo pkill taosadapter; fi
From 0ee9e3db566a05b8dec95d57d83bfe6d6ea61fce Mon Sep 17 00:00:00 2001
From: chenhaoran
Date: Sat, 22 Mar 2025 13:56:21 +0800
Subject: [PATCH 12/26] refactor: streamline library removal and linking in
installation scripts
---
packaging/tools/install.sh | 6 +++++-
packaging/tools/make_install.sh | 34 ++++++++++++++++++++++++++------
packaging/tools/remove.sh | 14 ++++++-------
packaging/tools/remove_client.sh | 17 ++++++++--------
4 files changed, 49 insertions(+), 22 deletions(-)
diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh
index 8fd483b6a7..56a18c64c6 100755
--- a/packaging/tools/install.sh
+++ b/packaging/tools/install.sh
@@ -273,9 +273,12 @@ function install_lib() {
${csudo}rm -f ${lib64_link_dir}/libtaos.* || :
${csudo}rm -f ${lib_link_dir}/libtaosnative.* || :
${csudo}rm -f ${lib64_link_dir}/libtaosnative.* || :
+ ${csudo}rm -f ${lib_link_dir}/libtaosws.* || :
+ ${csudo}rm -f ${lib64_link_dir}/libtaosws.* || :
#${csudo}rm -rf ${v15_java_app_dir} || :
${csudo}cp -rf ${script_dir}/driver/* ${install_main_dir}/driver && ${csudo}chmod 777 ${install_main_dir}/driver/*
+ #link lib/link_dir
${csudo}ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1
${csudo}ln -sf ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so
${csudo}ln -sf ${install_main_dir}/driver/libtaosnative.* ${lib_link_dir}/libtaosnative.so.1
@@ -283,13 +286,14 @@ function install_lib() {
[ -f ${install_main_dir}/driver/libtaosws.so ] && ${csudo}ln -sf ${install_main_dir}/driver/libtaosws.so ${lib_link_dir}/libtaosws.so || :
+ #link lib64/link_dir
if [[ -d ${lib64_link_dir} && ! -e ${lib64_link_dir}/libtaos.so ]]; then
${csudo}ln -sf ${install_main_dir}/driver/libtaos.* ${lib64_link_dir}/libtaos.so.1 || :
${csudo}ln -sf ${lib64_link_dir}/libtaos.so.1 ${lib64_link_dir}/libtaos.so || :
${csudo}ln -sf ${install_main_dir}/driver/libtaosnative.* ${lib64_link_dir}/libtaosnative.so.1 || :
${csudo}ln -sf ${lib64_link_dir}/libtaosnative.so.1 ${lib64_link_dir}/libtaosnative.so || :
- [ -f ${install_main_dir}/libtaosws.so ] && ${csudo}ln -sf ${install_main_dir}/libtaosws.so ${lib64_link_dir}/libtaosws.so || :
+ [ -f ${install_main_dir}/driver/libtaosws.so ] && ${csudo}ln -sf ${install_main_dir}/driver/libtaosws.so ${lib64_link_dir}/libtaosws.so || :
fi
${csudo}ldconfig
diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh
index 4a694f9841..de7dd2d2cb 100755
--- a/packaging/tools/make_install.sh
+++ b/packaging/tools/make_install.sh
@@ -312,15 +312,37 @@ function install_avro() {
function install_lib() {
# Remove links
- ${csudo}rm -f ${lib_link_dir}/libtaos.* || :
- ${csudo}rm -f ${lib_link_dir}/libtaosnative.* || :
- [ -f ${lib_link_dir}/libtaosws.so ] && ${csudo}rm -f ${lib_link_dir}/libtaosws.so || :
+ remove_links() {
+ local dir=$1
+ find ${dir} -name "libtaos.*" -exec ${csudo}rm -f {} \; || :
+ find ${dir} -name "libtaosnative.so" -exec ${csudo}rm -f {} \; || :
+ find ${dir} -name "libtaosws.so" -exec ${csudo}rm -f {} \; || :
+ }
+
+ remove_links ${lib_link_dir}
+
if [ "$osType" != "Darwin" ]; then
- ${csudo}rm -f ${lib64_link_dir}/libtaos.* || :
- ${csudo}rm -f ${lib64_link_dir}/libtaosnative.* || :
- [ -f ${lib64_link_dir}/libtaosws.so ] && ${csudo}rm -f ${lib64_link_dir}/libtaosws.so || :
+ remove_links ${lib64_link_dir}
fi
+ # Copy and set permissions for libraries
+ copy_and_set_permissions() {
+ local src=$1
+ local dest=$2
+ if [ "$osType" != "Darwin" ]; then
+ ${csudo}cp ${src} ${dest} && ${csudo}chmod 777 ${dest}
+ else
+ ${csudo}cp -Rf ${src} ${dest} && ${csudo}chmod 777 ${dest}
+ fi
+ }
+
+ # Create symbolic links
+ create_symlink() {
+ local target=$1
+ local link_name=$2
+ ${csudo}ln -sf ${target} ${link_name}
+ }
+
if [ "$osType" != "Darwin" ]; then
${csudo}cp ${binary_dir}/build/lib/libtaos.so.${verNumber} \
${install_main_dir}/driver &&
diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh
index d62aa5a564..91b1dfc461 100755
--- a/packaging/tools/remove.sh
+++ b/packaging/tools/remove.sh
@@ -5,7 +5,7 @@
set -e
#set -x
-verMode=edge
+verMode=cluster
osType=`uname`
RED='\033[0;31m'
@@ -179,13 +179,13 @@ remove_bin() {
function clean_lib() {
# Remove link
- ${csudo}rm -f ${lib_link_dir}/libtaos.* || :
- [ -f ${lib_link_dir}/libtaosnative.* ] && ${csudo}rm -f ${lib_link_dir}/libtaosnative.* || :
- [ -f ${lib_link_dir}/libtaosws.* ] && ${csudo}rm -f ${lib_link_dir}/libtaosws.* || :
+ ${csudo}find ${lib_link_dir} -name "libtaos.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib_link_dir} -name "libtaosnative.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib_link_dir} -name "libtaosws.*" -exec ${csudo}rm -f {} \; || :
- ${csudo}rm -f ${lib64_link_dir}/libtaos.* || :
- [ -f ${lib64_link_dir}/libtaosnative.* ] && ${csudo}rm -f ${lib64_link_dir}/libtaosnative.* || :
- [ -f ${lib64_link_dir}/libtaosws.* ] && ${csudo}rm -f ${lib64_link_dir}/libtaosws.* || :
+ ${csudo}find ${lib64_link_dir} -name "libtaos.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib64_link_dir} -name "libtaosnative.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib64_link_dir} -name "libtaosws.*" -exec ${csudo}rm -f {} \; || :
#${csudo}rm -rf ${v15_java_app_dir} || :
}
diff --git a/packaging/tools/remove_client.sh b/packaging/tools/remove_client.sh
index e6ec9c3768..e5c3842a5e 100755
--- a/packaging/tools/remove_client.sh
+++ b/packaging/tools/remove_client.sh
@@ -70,15 +70,16 @@ function clean_bin() {
}
function clean_lib() {
- # Remove link
- ${csudo}rm -f ${lib_link_dir}/libtaos.* || :
- [ -f ${lib_link_dir}/libtaosws.* ] && ${csudo}rm -f ${lib_link_dir}/libtaosws.* || :
- [ -f ${lib_link_dir}/libtaosnative.* ] && ${csudo}rm -f ${lib_link_dir}/libtaosnative.* || :
+ # Remove link
+ ${csudo}find ${lib_link_dir} -name "libtaos.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib_link_dir} -name "libtaosnative.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib_link_dir} -name "libtaosws.*" -exec ${csudo}rm -f {} \; || :
+
+ ${csudo}find ${lib64_link_dir} -name "libtaos.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib64_link_dir} -name "libtaosnative.*" -exec ${csudo}rm -f {} \; || :
+ ${csudo}find ${lib64_link_dir} -name "libtaosws.*" -exec ${csudo}rm -f {} \; || :
+ #${csudo}rm -rf ${v15_java_app_dir} || :
- ${csudo}rm -f ${lib64_link_dir}/libtaos.* || :
- [ -f ${lib64_link_dir}/libtaosws.* ] && ${csudo}rm -f ${lib64_link_dir}/libtaosws.* || :
- [ -f ${lib64_link_dir}/libtaosnative.* ] && ${csudo}rm -f ${lib64_link_dir}/libtaosnative.* || :
- #${csudo}rm -rf ${v15_java_app_dir} || :
}
function clean_header() {
From 42dbebaff7b738e10d27ca83233e2476be0b761a Mon Sep 17 00:00:00 2001
From: WANG Xu
Date: Sat, 22 Mar 2025 14:29:04 +0800
Subject: [PATCH 13/26] chore: update build badge
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0a52daafab..a5abe6e1b1 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
-[](https://github.com/taosdata/TDengine/actions/workflows/tdengine-test.yml)
+[](https://github.com/taosdata/TDengine/actions/workflows/tdengine-release-build.yml)
[](https://coveralls.io/github/taosdata/TDengine?branch=3.0)
[](https://github.com/feici02/TDengine/commits/main/)
From 9c07a28e6573b0e32dab04b8eff14c5cc0bb6798 Mon Sep 17 00:00:00 2001
From: haoranchen
Date: Sat, 22 Mar 2025 14:35:05 +0800
Subject: [PATCH 14/26] Update remove.sh
---
packaging/tools/remove.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh
index 91b1dfc461..1f75f00d5d 100755
--- a/packaging/tools/remove.sh
+++ b/packaging/tools/remove.sh
@@ -5,7 +5,7 @@
set -e
#set -x
-verMode=cluster
+verMode=edge
osType=`uname`
RED='\033[0;31m'
@@ -338,4 +338,4 @@ fi
command -v systemctl >/dev/null 2>&1 && ${csudo}systemctl daemon-reload >/dev/null 2>&1 || true
echo
echo "${productName} is removed successfully!"
-echo
\ No newline at end of file
+echo
From 3a29a1daf12dcfe156066d82d99c8edeb39b9f5e Mon Sep 17 00:00:00 2001
From: WANG Xu
Date: Sat, 22 Mar 2025 13:36:29 +0800
Subject: [PATCH 15/26] ci: add release build
Signed-off-by: WANG Xu
---
.github/workflows/tdengine-release-build.yml | 114 +++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 .github/workflows/tdengine-release-build.yml
diff --git a/.github/workflows/tdengine-release-build.yml b/.github/workflows/tdengine-release-build.yml
new file mode 100644
index 0000000000..ef708a0ac9
--- /dev/null
+++ b/.github/workflows/tdengine-release-build.yml
@@ -0,0 +1,114 @@
+name: TDengine Release Build
+
+on:
+ push:
+ branches:
+ - 'main'
+ - '3.*'
+ paths-ignore:
+ - 'docs/**'
+ - 'packaging/**'
+ - 'tests/**'
+ - '**/*.md'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ name: Run on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-22.04
+ - macos-14
+
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: 1.18
+
+ - name: Install dependencies on Linux
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt update -y
+ sudo apt install -y \
+ build-essential \
+ cmake \
+ gawk \
+ libgeos-dev \
+ libjansson-dev \
+ liblzma-dev \
+ libsnappy-dev \
+ libssl-dev \
+ libz-dev \
+ pkg-config \
+ zlib1g
+
+ - name: Install dependencies on macOS
+ if: runner.os == 'macOS'
+ run: |
+ brew update
+ brew install \
+ argp-standalone \
+ gawk \
+ gflags \
+ geos \
+ jansson \
+ openssl \
+ pkg-config \
+ snappy \
+ zlib
+
+ - name: Build and install TDengine
+ run: |
+ mkdir debug && cd debug
+ cmake .. -DBUILD_TOOLS=true \
+ -DBUILD_KEEPER=true \
+ -DBUILD_HTTP=false \
+ -DBUILD_TEST=true \
+ -DWEBSOCKET=true \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_DEPENDENCY_TESTS=false
+ make -j 4
+ sudo make install
+ which taosd
+ which taosadapter
+ which taoskeeper
+
+ - name: Statistics ldd
+ run: |
+ find ${{ github.workspace }}/debug/build/lib -type f -name "*.so" -print0 | xargs -0 ldd || true
+ find ${{ github.workspace }}/debug/build/bin -type f -print0 | xargs -0 ldd || true
+
+ - name: Statistics size
+ run: |
+ find ${{ github.workspace }}/debug/build/lib -type f -print0 | xargs -0 ls -lhrS
+ find ${{ github.workspace }}/debug/build/bin -type f -print0 | xargs -0 ls -lhrS
+
+ - name: Start taosd
+ run: |
+ cp /etc/taos/taos.cfg ./
+ sudo echo "supportVnodes 256" >> taos.cfg
+ nohup sudo taosd -c taos.cfg &
+
+ - name: Start taosadapter
+ run: nohup sudo taosadapter &
+
+ - name: Run tests with taosBenchmark
+ run: |
+ taosBenchmark -t 10 -n 10 -y
+ taos -s "select count(*) from test.meters"
+
+ - name: Clean up
+ if: always()
+ run: |
+ if pgrep taosd; then sudo pkill taosd; fi
+ if pgrep taosadapter; then sudo pkill taosadapter; fi
From 523b7003a4d007c0a0132d0e54c706956ec586bf Mon Sep 17 00:00:00 2001
From: haoranchen
Date: Sat, 22 Mar 2025 15:31:16 +0800
Subject: [PATCH 16/26] fix: add requests pkg in tdgpt install.sh
---
tools/tdgpt/script/install.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/tdgpt/script/install.sh b/tools/tdgpt/script/install.sh
index 9952b7f0af..e5bf87740b 100755
--- a/tools/tdgpt/script/install.sh
+++ b/tools/tdgpt/script/install.sh
@@ -400,6 +400,7 @@ function install_anode_venv() {
${csudo}${venvDir}/bin/pip3 install uwsgi
${csudo}${venvDir}/bin/pip3 install torch --index-url https://download.pytorch.org/whl/cpu
${csudo}${venvDir}/bin/pip3 install --upgrade keras
+ ${csudo}${venvDir}/bin/pip3 install requests
echo -e "Install python library for venv completed!"
}
From e273a943eaeb4a872736598cf495233a8498dea1 Mon Sep 17 00:00:00 2001
From: Linhe Huo
Date: Sat, 22 Mar 2025 20:44:07 +0800
Subject: [PATCH 17/26] fix: add show connMode string (#30323)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: add show connMode string
* fix: add stdbool.h to pub.h
* fix: remove trash file army/output.txt
* fix: caseBase.py modify syntax error
* fix: restore -R option for taosdump
* fix: taosdumpCommandline.py case
* fix: native stmt write normal table failed
* fix: taosdumpCommandline.py case passed
* fix: restore test.py from main branch
* fix: taosCli.py check default conn mode
* fix: commandline-sml.py case pass
* fix: websiteCase.py case passed
* fix: connMode.py case
* fix: modify default port is 0
* fix: taos_options with config dir not work
* fix: websocket.py delete -D timeout options
* fix: default_tmq_json.py context move to default_json.py, so delete
* fix python kafka bug
* chore: improve taos_init in wrapper
* chore: add installation path preparation in build workflow
* fix connMode bug
* fix: fix tmq conf/consumer new error in wrapperFunc.c
* fix: correct the spelling toss -> taosGetInstall...
* chore: fix compile error in wrapperFunc.c
* fix: createConnect fix memory leak
* fix: tsim forbid CHECK ODR
* modify userOperTest uuse static lib
* reverse userOperTest use static lib
---------
Co-authored-by: Alex Duan <417921451@qq.com>
Co-authored-by: taos-support
Co-authored-by: “chris <“zk662144@163.com”>
Co-authored-by: t_max <1172915550@qq.com>
Co-authored-by: sheyanjie-qq <249478495@qq.com>
---
.github/workflows/tdengine-build.yml | 5 ++
.../examples/python/kafka_example_consumer.py | 8 +--
source/client/test/CMakeLists.txt | 2 +-
source/client/wrapper/src/wrapperDriver.c | 4 +-
source/client/wrapper/src/wrapperFunc.c | 30 +++++++----
tests/army/cmdline/taosCli.py | 11 +++-
tests/army/frame/caseBase.py | 4 +-
tests/army/output.txt | 52 -------------------
tests/army/test.py | 6 +--
.../tools/benchmark/basic/commandline-sml.py | 12 ++---
tests/army/tools/benchmark/basic/connMode.py | 9 ++--
.../army/tools/benchmark/basic/websiteCase.py | 2 +-
tests/army/tools/benchmark/ws/websocket.py | 2 +-
.../taosdump/native/taosdumpCommandline.py | 11 +---
tests/develop-test/test.py | 2 -
tests/docs-examples-test/python.sh | 5 +-
tests/parallel_test/cases.task | 1 -
tests/script/test.sh | 3 ++
tests/system-test/test.py | 19 +++----
tools/inc/pub.h | 6 ++-
tools/shell/src/shellArguments.c | 4 --
tools/shell/src/shellEngine.c | 11 ++--
tools/shell/src/shellMain.c | 2 +-
tools/src/pub.c | 16 ++++--
tools/taos-tools/src/benchData.c | 4 +-
tools/taos-tools/src/benchMain.c | 2 +-
tools/taos-tools/src/taosdump.c | 7 ++-
27 files changed, 105 insertions(+), 135 deletions(-)
delete mode 100644 tests/army/output.txt
diff --git a/.github/workflows/tdengine-build.yml b/.github/workflows/tdengine-build.yml
index 017c9d69fa..07cd17feab 100644
--- a/.github/workflows/tdengine-build.yml
+++ b/.github/workflows/tdengine-build.yml
@@ -74,6 +74,11 @@ jobs:
snappy \
zlib
+ - name: prepare install path
+ run: |
+ sudo mkdir -p /usr/local/lib
+ sudo mkdir -p /usr/local/include
+
- name: Build and install TDengine
run: |
mkdir debug && cd debug
diff --git a/docs/examples/python/kafka_example_consumer.py b/docs/examples/python/kafka_example_consumer.py
index e2d5cf535b..43c140fe78 100644
--- a/docs/examples/python/kafka_example_consumer.py
+++ b/docs/examples/python/kafka_example_consumer.py
@@ -182,7 +182,7 @@ def test_json_to_taos(consumer: Consumer):
'voltage': 105,
'phase': 0.02027, }),
partition=1, topic='test', serialized_key_size=None, serialized_header_size=None,
- serialized_value_size=None, timestamp=time.time(), timestamp_type=None),
+ serialized_value_size=None, timestamp=time.time(), timestamp_type=None, leader_epoch=0),
ConsumerRecord(checksum=None, headers=None, offset=1, key=None,
value=json.dumps({'table_name': 'd1',
'ts': '2022-12-06 15:13:39.643',
@@ -190,7 +190,7 @@ def test_json_to_taos(consumer: Consumer):
'voltage': 102,
'phase': 0.02027, }),
partition=1, topic='test', serialized_key_size=None, serialized_header_size=None,
- serialized_value_size=None, timestamp=time.time(), timestamp_type=None),
+ serialized_value_size=None, timestamp=time.time(), timestamp_type=None,leader_epoch=0 ),
]
]
@@ -203,11 +203,11 @@ def test_line_to_taos(consumer: Consumer):
ConsumerRecord(checksum=None, headers=None, offset=1, key=None,
value="d0 values('2023-01-01 00:00:00.001', 3.49, 109, 0.02737)".encode('utf-8'),
partition=1, topic='test', serialized_key_size=None, serialized_header_size=None,
- serialized_value_size=None, timestamp=time.time(), timestamp_type=None),
+ serialized_value_size=None, timestamp=time.time(), timestamp_type=None,leader_epoch=0 ),
ConsumerRecord(checksum=None, headers=None, offset=1, key=None,
value="d1 values('2023-01-01 00:00:00.002', 6.19, 112, 0.09171)".encode('utf-8'),
partition=1, topic='test', serialized_key_size=None, serialized_header_size=None,
- serialized_value_size=None, timestamp=time.time(), timestamp_type=None),
+ serialized_value_size=None, timestamp=time.time(), timestamp_type=None,leader_epoch=0 ),
]
]
consumer._line_to_taos(messages=records)
diff --git a/source/client/test/CMakeLists.txt b/source/client/test/CMakeLists.txt
index cee5dc08f9..161deb12cd 100644
--- a/source/client/test/CMakeLists.txt
+++ b/source/client/test/CMakeLists.txt
@@ -129,4 +129,4 @@ add_test(
add_test(
NAME userOperTest
COMMAND userOperTest
-)
\ No newline at end of file
+)
diff --git a/source/client/wrapper/src/wrapperDriver.c b/source/client/wrapper/src/wrapperDriver.c
index 415affc66f..341485e448 100644
--- a/source/client/wrapper/src/wrapperDriver.c
+++ b/source/client/wrapper/src/wrapperDriver.c
@@ -39,7 +39,7 @@ EDriverType tsDriverType = DRIVER_NATIVE;
void *tsDriver = NULL;
-static int32_t tossGetDevelopPath(char *driverPath, const char *driverName) {
+static int32_t taosGetDevelopPath(char *driverPath, const char *driverName) {
char appPath[PATH_MAX] = {0};
int32_t ret = taosAppPath(appPath, PATH_MAX);
if (ret == 0) {
@@ -67,7 +67,7 @@ int32_t taosDriverInit(EDriverType driverType) {
driverName = DRIVER_WSBSOCKET_NAME;
}
- if (tsDriver == NULL && tossGetDevelopPath(driverPath, driverName) == 0) {
+ if (tsDriver == NULL && taosGetDevelopPath(driverPath, driverName) == 0) {
tsDriver = taosLoadDll(driverPath);
}
diff --git a/source/client/wrapper/src/wrapperFunc.c b/source/client/wrapper/src/wrapperFunc.c
index e77de0b82d..ed5200c064 100644
--- a/source/client/wrapper/src/wrapperFunc.c
+++ b/source/client/wrapper/src/wrapperFunc.c
@@ -19,6 +19,9 @@
static TdThreadOnce tsDriverOnce = PTHREAD_ONCE_INIT;
volatile int32_t tsDriverOnceRet = 0;
+static TdThreadOnce tsInitOnce = PTHREAD_ONCE_INIT;
+volatile int32_t tsInitOnceRet = 0;
+
#define ERR_VOID(code) \
terrno = code; \
return;
@@ -89,21 +92,25 @@ setConfRet taos_set_config(const char *config) {
return (*fp_taos_set_config)(config);
}
-static void taos_init_wrapper(void) {
+static void taos_init_driver(void) {
tsDriverOnceRet = taosDriverInit(tsDriverType);
if (tsDriverOnceRet != 0) return;
+ tsDriverOnceRet = 0;
+}
+static void taos_init_wrapper(void) {
if (fp_taos_init == NULL) {
terrno = TSDB_CODE_DLL_FUNC_NOT_LOAD;
- tsDriverOnceRet = -1;
+ tsInitOnceRet = -1;
} else {
- tsDriverOnceRet = (*fp_taos_init)();
+ tsInitOnceRet = (*fp_taos_init)();
}
}
int taos_init(void) {
- (void)taosThreadOnce(&tsDriverOnce, taos_init_wrapper);
- return tsDriverOnceRet;
+ (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
+ (void)taosThreadOnce(&tsInitOnce, taos_init_wrapper);
+ return tsInitOnceRet;
}
void taos_cleanup(void) {
@@ -126,11 +133,7 @@ int taos_options(TSDB_OPTION option, const void *arg, ...) {
terrno = TSDB_CODE_REPEAT_INIT;
return -1;
}
-
- if (taos_init() != 0) {
- terrno = TSDB_CODE_DLL_NOT_LOAD;
- return -1;
- }
+ (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
CHECK_INT(fp_taos_options);
return (*fp_taos_options)(option, arg);
@@ -143,7 +146,7 @@ int taos_options_connection(TAOS *taos, TSDB_OPTION_CONNECTION option, const voi
TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port) {
if (taos_init() != 0) {
- terrno = TSDB_CODE_DLL_NOT_LOAD;
+ //terrno = TSDB_CODE_DLL_NOT_LOAD;
return NULL;
}
@@ -646,6 +649,7 @@ TAOS_RES *taos_schemaless_insert_ttl_with_reqid_tbname_key(TAOS *taos, char *lin
}
tmq_conf_t *tmq_conf_new() {
+ taos_init();
CHECK_PTR(fp_tmq_conf_new);
return (*fp_tmq_conf_new)();
}
@@ -666,6 +670,7 @@ void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *para
}
tmq_list_t *tmq_list_new() {
+ taos_init();
CHECK_PTR(fp_tmq_list_new);
return (*fp_tmq_list_new)();
}
@@ -691,6 +696,7 @@ char **tmq_list_to_c_array(const tmq_list_t *tlist) {
}
tmq_t *tmq_consumer_new(tmq_conf_t *conf, char *errstr, int32_t errstrLen) {
+ taos_init();
CHECK_PTR(fp_tmq_consumer_new);
return (*fp_tmq_consumer_new)(conf, errstr, errstrLen);
}
@@ -860,11 +866,13 @@ TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *de
}
void taos_write_crashinfo(int signum, void *sigInfo, void *context) {
+ taos_init();
CHECK_VOID(fp_taos_write_crashinfo);
(*fp_taos_write_crashinfo)(signum, sigInfo, context);
}
char *getBuildInfo() {
+ taos_init();
CHECK_PTR(fp_getBuildInfo);
return (*fp_getBuildInfo)();
}
diff --git a/tests/army/cmdline/taosCli.py b/tests/army/cmdline/taosCli.py
index 2624248a28..4aee8f1219 100644
--- a/tests/army/cmdline/taosCli.py
+++ b/tests/army/cmdline/taosCli.py
@@ -263,7 +263,7 @@ class TDTestCase(TBase):
['-a "abc"', "[0x80000357]"],
]
for arg in args:
- rlist = self.taos("Z 0 " + arg[0])
+ rlist = self.taos("-Z 0 " + arg[0])
if arg[1] != None:
self.checkListString(rlist, arg[1])
@@ -340,9 +340,14 @@ class TDTestCase(TBase):
self.checkExcept(taos + " -s 'show dnodes;' " + option)
def checkModeVersion(self):
+
+ # check default conn mode
+ #DEFAULT_CONN = "WebSocket"
+ DEFAULT_CONN = "Native"
+
# results
results = [
- "WebSocket Client Version",
+ f"{DEFAULT_CONN} Client Version",
"2022-10-01 00:01:39.000",
"Query OK, 100 row(s) in set"
]
@@ -351,8 +356,10 @@ class TDTestCase(TBase):
cmd = f"-s 'select ts from test.d0'"
rlist = self.taos(cmd, checkRun = True)
self.checkManyString(rlist, results)
+
# websocket
cmd = f"-Z 1 -s 'select ts from test.d0'"
+ results[0] = "WebSocket Client Version"
rlist = self.taos(cmd, checkRun = True)
self.checkManyString(rlist, results)
diff --git a/tests/army/frame/caseBase.py b/tests/army/frame/caseBase.py
index b8345c3257..7a73ce09d4 100644
--- a/tests/army/frame/caseBase.py
+++ b/tests/army/frame/caseBase.py
@@ -196,9 +196,9 @@ class TBase:
tdSql.checkFirstValue(sql, expect)
# order by desc limit 1 with last
- sql = f"select first({col}) from {self.db}.{self.db}."
+ sql = f"select first({col}) from {self.db}.{self.stb}"
expect = tdSql.getFirstValue(sql)
- sql = f"select {col} from {self.db}.{self.db}. order by _c0 asc limit 1"
+ sql = f"select {col} from {self.db}.{self.stb} order by _c0 asc limit 1"
tdSql.checkFirstValue(sql, expect)
diff --git a/tests/army/output.txt b/tests/army/output.txt
deleted file mode 100644
index 132781c0db..0000000000
--- a/tests/army/output.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-[02/10 13:52:16.164959] SUCC: created database (test)
-[02/10 13:52:16.182024] INFO: start creating 1000 table(s) with 8 thread(s)
-[02/10 13:52:16.396337] SUCC: Spent 0.2140 seconds to create 1000 table(s) with 8 thread(s) speed: 4673 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
-[02/10 13:53:05.155428] SUCC: thread[2] progressive mode, completed total inserted rows: 12500000, 339193.01 records/second
-[02/10 13:53:05.160652] SUCC: thread[7] progressive mode, completed total inserted rows: 12500000, 341816.65 records/second
-[02/10 13:53:05.207601] SUCC: thread[0] progressive mode, completed total inserted rows: 12500000, 340556.51 records/second
-[02/10 13:53:05.215370] SUCC: thread[4] progressive mode, completed total inserted rows: 12500000, 338804.97 records/second
-[02/10 13:53:05.224077] SUCC: thread[5] progressive mode, completed total inserted rows: 12500000, 338596.28 records/second
-[02/10 13:53:05.249786] SUCC: thread[1] progressive mode, completed total inserted rows: 12500000, 339208.40 records/second
-[02/10 13:53:05.256970] SUCC: thread[3] progressive mode, completed total inserted rows: 12500000, 339174.04 records/second
-[02/10 13:53:05.274900] SUCC: thread[6] progressive mode, completed total inserted rows: 12500000, 339551.12 records/second
-[02/10 13:53:05.275900] SUCC: Spent 48.867685 (real 36.806958) seconds to insert rows: 100000000 with 8 thread(s) into test 2046342.08 (real 2716877.61) records/second
-[02/10 13:53:05.275909] SUCC: insert delay, min: 11.2580ms, avg: 29.4456ms, p90: 32.7750ms, p95: 34.1120ms, p99: 39.5900ms, max: 70.3780ms
-[02/12 15:46:06.469780] SUCC: created database (test)
-[02/12 15:46:06.499844] INFO: start creating 10000 table(s) with 8 thread(s)
-[02/12 15:46:08.185009] SUCC: Spent 1.6860 seconds to create 10000 table(s) with 8 thread(s) speed: 5931 tables/s, already exist 0 table(s), actual 10000 table(s) pre created, 0 table(s) will be auto created
-[02/12 15:46:57.356674] SUCC: thread[0] progressive mode, completed total inserted rows: 12500000, 339076.93 records/second
-[02/12 15:46:57.434553] SUCC: thread[1] progressive mode, completed total inserted rows: 12500000, 338528.52 records/second
-[02/12 15:46:57.452522] SUCC: thread[2] progressive mode, completed total inserted rows: 12500000, 339844.37 records/second
-[02/12 15:46:57.452921] SUCC: thread[5] progressive mode, completed total inserted rows: 12500000, 339349.90 records/second
-[02/12 15:46:57.463726] SUCC: thread[4] progressive mode, completed total inserted rows: 12500000, 339986.37 records/second
-[02/12 15:46:57.466467] SUCC: thread[3] progressive mode, completed total inserted rows: 12500000, 339785.50 records/second
-[02/12 15:46:57.499118] SUCC: thread[6] progressive mode, completed total inserted rows: 12500000, 339326.86 records/second
-[02/12 15:46:57.501694] SUCC: thread[7] progressive mode, completed total inserted rows: 12500000, 338309.30 records/second
-[02/12 15:46:57.502535] SUCC: Spent 49.309586 (real 36.843268) seconds to insert rows: 100000000 with 8 thread(s) into test 2028003.24 (real 2714200.05) records/second
-[02/12 15:46:57.502546] SUCC: insert delay, min: 10.9580ms, avg: 29.4746ms, p90: 32.6960ms, p95: 33.8290ms, p99: 36.8390ms, max: 77.9940ms
-[02/14 15:27:32.543409] SUCC: created database (test)
-[02/14 15:27:32.568881] INFO: start creating 10000 table(s) with 8 thread(s)
-[02/14 15:27:34.249759] SUCC: Spent 1.6810 seconds to create 10000 table(s) with 8 thread(s) speed: 5949 tables/s, already exist 0 table(s), actual 10000 table(s) pre created, 0 table(s) will be auto created
-[02/14 15:28:26.165699] SUCC: thread[0] progressive mode, completed total inserted rows: 12500000, 321266.73 records/second
-[02/14 15:28:26.281188] SUCC: thread[4] progressive mode, completed total inserted rows: 12500000, 319863.00 records/second
-[02/14 15:28:26.326975] SUCC: thread[5] progressive mode, completed total inserted rows: 12500000, 321802.51 records/second
-[02/14 15:28:26.328615] SUCC: thread[6] progressive mode, completed total inserted rows: 12500000, 321804.13 records/second
-[02/14 15:28:26.379189] SUCC: thread[7] progressive mode, completed total inserted rows: 12500000, 320719.22 records/second
-[02/14 15:28:26.400891] SUCC: thread[1] progressive mode, completed total inserted rows: 12500000, 321512.59 records/second
-[02/14 15:28:26.470912] SUCC: thread[2] progressive mode, completed total inserted rows: 12500000, 319026.94 records/second
-[02/14 15:28:26.565079] SUCC: thread[3] progressive mode, completed total inserted rows: 12500000, 317248.21 records/second
-[02/14 15:28:26.566013] SUCC: Spent 52.307623 (real 39.013939) seconds to insert rows: 100000000 with 8 thread(s) into test 1911767.24 (real 2563186.45) records/second
-[02/14 15:28:26.566024] SUCC: insert delay, min: 11.1290ms, avg: 31.2112ms, p90: 35.4900ms, p95: 37.0580ms, p99: 41.5180ms, max: 68.5900ms
-[02/17 14:09:42.181835] SUCC: created database (test)
-[02/17 14:09:42.210373] INFO: start creating 10000 table(s) with 8 thread(s)
-[02/17 14:09:44.199467] SUCC: Spent 1.9890 seconds to create 10000 table(s) with 8 thread(s) speed: 5028 tables/s, already exist 0 table(s), actual 10000 table(s) pre created, 0 table(s) will be auto created
-[02/17 14:10:32.845475] SUCC: thread[3] progressive mode, completed total inserted rows: 12500000, 338184.62 records/second
-[02/17 14:10:32.872586] SUCC: thread[4] progressive mode, completed total inserted rows: 12500000, 338445.48 records/second
-[02/17 14:10:32.873271] SUCC: thread[1] progressive mode, completed total inserted rows: 12500000, 339256.73 records/second
-[02/17 14:10:32.938231] SUCC: thread[5] progressive mode, completed total inserted rows: 12500000, 338737.29 records/second
-[02/17 14:10:32.947655] SUCC: thread[2] progressive mode, completed total inserted rows: 12500000, 338938.99 records/second
-[02/17 14:10:32.952985] SUCC: thread[0] progressive mode, completed total inserted rows: 12500000, 338652.89 records/second
-[02/17 14:10:32.962370] SUCC: thread[6] progressive mode, completed total inserted rows: 12500000, 338890.00 records/second
-[02/17 14:10:32.998729] SUCC: thread[7] progressive mode, completed total inserted rows: 12500000, 339216.19 records/second
-[02/17 14:10:32.999680] SUCC: Spent 48.790057 (real 36.896020) seconds to insert rows: 100000000 with 8 thread(s) into test 2049597.93 (real 2710319.43) records/second
-[02/17 14:10:32.999696] SUCC: insert delay, min: 10.7720ms, avg: 29.5168ms, p90: 32.6910ms, p95: 33.8370ms, p99: 36.6750ms, max: 76.0590ms
diff --git a/tests/army/test.py b/tests/army/test.py
index a66743b40a..6ac0948b7b 100644
--- a/tests/army/test.py
+++ b/tests/army/test.py
@@ -37,9 +37,6 @@ import taos
import taosrest
import taosws
-from taos.cinterface import *
-taos.taos_options(6, "native")
-
def checkRunTimeError():
import win32gui
timeCount = 0
@@ -261,9 +258,8 @@ if __name__ == "__main__":
#
# do exeCmd command
#
- taosAdapter = True # default is websocket , so must start taosAdapter
if not execCmd == "":
- if taosAdapter or restful or websocket:
+ if taosAdapter or taosAdapter or restful or websocket:
tAdapter.init(deployPath)
else:
tdDnodes.init(deployPath)
diff --git a/tests/army/tools/benchmark/basic/commandline-sml.py b/tests/army/tools/benchmark/basic/commandline-sml.py
index 4533dedbbd..8032abdecd 100644
--- a/tests/army/tools/benchmark/basic/commandline-sml.py
+++ b/tests/army/tools/benchmark/basic/commandline-sml.py
@@ -68,14 +68,10 @@ class TDTestCase(TBase):
tdSql.checkData(0, 0, 10*10000)
# add normal table
- cmd = "%s -N -I sml -t 2 -n 10000 -y" % binPath
- tdLog.info("%s" % cmd)
- os.system("%s" % cmd)
-
- tdSql.query("select count(*) from test.d0")
- tdSql.checkData(0, 0, 1*10000)
- tdSql.query("select count(*) from test.d1")
- tdSql.checkData(0, 0, 1*10000)
+ cmd = "-N -I sml -t 2 -n 10000 -y"
+ rlist = self.benchmark(cmd, checkRun = False)
+ # expect failed
+ self.checkListString(rlist, "schemaless cannot work without stable")
def stop(self):
tdSql.close()
diff --git a/tests/army/tools/benchmark/basic/connMode.py b/tests/army/tools/benchmark/basic/connMode.py
index 0f3a99a386..8e85f6a995 100644
--- a/tests/army/tools/benchmark/basic/connMode.py
+++ b/tests/army/tools/benchmark/basic/connMode.py
@@ -68,12 +68,15 @@ class TDTestCase(TBase):
os.environ['TDENGINE_CLOUD_DSN'] = ""
def checkCommandLine(self):
+ # default CONN_MODE
+ DEFAULT_CONN_MODE = "Native"
+
# modes
modes = ["", "-Z 1 -B 1", "-Z websocket", "-Z 0", "-Z native -B 2"]
# result
Rows = "insert rows: 9990"
results1 = [
- ["Connect mode is : WebSocket", Rows],
+ [f"Connect mode is : {DEFAULT_CONN_MODE}", Rows],
["Connect mode is : WebSocket", Rows],
["Connect mode is : WebSocket", Rows],
["Connect mode is : Native", Rows],
@@ -112,7 +115,7 @@ class TDTestCase(TBase):
# ommand
#
self.benchmarkCmd("-h 127.0.0.1", 5, 100, 10, ["insert rows: 500"])
- self.benchmarkCmd("-h 127.0.0.1 -P 6041 -uroot -ptaosdata", 5, 100, 10, ["insert rows: 500"])
+ self.benchmarkCmd("-h 127.0.0.1 -uroot -ptaosdata", 5, 100, 10, ["insert rows: 500"])
self.benchmarkCmd("-Z 0 -h 127.0.0.1 -P 6030 -uroot -ptaosdata", 5, 100, 10, ["insert rows: 500"])
#
@@ -120,7 +123,7 @@ class TDTestCase(TBase):
#
# 6041 is default
- options = "-h 127.0.0.1 -P 6041 -uroot -ptaosdata"
+ options = "-Z 1 -h 127.0.0.1 -P 6041 -uroot -ptaosdata"
json = "tools/benchmark/basic/json/connModePriorityErrHost.json"
self.insertBenchJson(json, options, True)
diff --git a/tests/army/tools/benchmark/basic/websiteCase.py b/tests/army/tools/benchmark/basic/websiteCase.py
index 67b5620931..55ee7dcb01 100644
--- a/tests/army/tools/benchmark/basic/websiteCase.py
+++ b/tests/army/tools/benchmark/basic/websiteCase.py
@@ -221,7 +221,7 @@ class TDTestCase(TBase):
def checkTmqJson(self, benchmark, json):
OK_RESULT = "Consumed total msgs: 30, total rows: 300000"
cmd = benchmark + " -f " + json
- output,error = frame.eos.run(cmd, 600)
+ output, error, code = frame.eos.run(cmd, 600)
if output.find(OK_RESULT) != -1:
tdLog.info(f"succ: {cmd} found '{OK_RESULT}'")
else:
diff --git a/tests/army/tools/benchmark/ws/websocket.py b/tests/army/tools/benchmark/ws/websocket.py
index 1394e892ef..8242bf8716 100644
--- a/tests/army/tools/benchmark/ws/websocket.py
+++ b/tests/army/tools/benchmark/ws/websocket.py
@@ -29,7 +29,7 @@ class TDTestCase(TBase):
def run(self):
binPath = etool.benchMarkFile()
- cmd = "%s -t 1 -n 1 -y -W http://localhost:6041 -D 30" % binPath
+ cmd = "%s -t 1 -n 1 -y -W http://localhost:6041 " % binPath
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
diff --git a/tests/army/tools/taosdump/native/taosdumpCommandline.py b/tests/army/tools/taosdump/native/taosdumpCommandline.py
index c3b33ba45e..d00df415e2 100644
--- a/tests/army/tools/taosdump/native/taosdumpCommandline.py
+++ b/tests/army/tools/taosdump/native/taosdumpCommandline.py
@@ -158,7 +158,7 @@ class TDTestCase(TBase):
def basicCommandLine(self, tmpdir):
#command and check result
checkItems = [
- [f"-h 127.0.0.1 -P 6041 -uroot -ptaosdata -A -N -o {tmpdir}", ["OK: Database test dumped"]],
+ [f"-Z 0 -h 127.0.0.1 -P 6030 -uroot -ptaosdata -A -N -o {tmpdir}", ["OK: Database test dumped"]],
[f"-r result -a -e test d0 -o {tmpdir}", ["OK: table: d0 dumped", "OK: 100 row(s) dumped out!"]],
[f"-n -D test -o {tmpdir}", ["OK: Database test dumped", "OK: 205 row(s) dumped out!"]],
[f"-Z 0 -P 6030 -n -D test -o {tmpdir}", ["OK: Database test dumped", "OK: 205 row(s) dumped out!"]],
@@ -348,19 +348,12 @@ class TDTestCase(TBase):
self.exceptCommandLine(taosdump, db, stb, tmpdir)
tdLog.info("4. except command line ................................. [Passed]")
- json = "./tools/taosdump/native/json/insertOther.json"
- # insert
- db, stb, childCount, insertRows = self.insertData(json)
- # dump in/out
- self.dumpInOutMode("", db , json, tmpdir)
- tdLog.info("5. native varbinary geometry ........................... [Passed]")
-
#
# check connMode
#
self.checkConnMode(db, stb, childCount, insertRows, tmpdir)
- tdLog.info("6. check conn mode ..................................... [Passed]")
+ tdLog.info("5. check conn mode ..................................... [Passed]")
def stop(self):
diff --git a/tests/develop-test/test.py b/tests/develop-test/test.py
index b291e58e3d..3525fd6332 100644
--- a/tests/develop-test/test.py
+++ b/tests/develop-test/test.py
@@ -38,8 +38,6 @@ from util.taosadapter import *
import taos
import taosrest
-from taos.cinterface import *
-taos.taos_options(6, "native")
def checkRunTimeError():
import win32gui
diff --git a/tests/docs-examples-test/python.sh b/tests/docs-examples-test/python.sh
index 8e43f26d5c..49e3875a6a 100644
--- a/tests/docs-examples-test/python.sh
+++ b/tests/docs-examples-test/python.sh
@@ -126,7 +126,7 @@ python3 mockdatasource.py
python3 fast_write_example.py
# 20
-pip3 install kafka-python
+pip3 install kafka-python==2.1.2
python3 kafka_example_consumer.py
# 21
@@ -196,4 +196,5 @@ check_transactions || exit 1
reset_cache || exit 1
python3 tmq_websocket_example.py
-python3 stmt2_native.py
\ No newline at end of file
+python3 stmt2_native.py
+
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index 75c50ceb05..b5f41838df 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -108,7 +108,6 @@
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/custom_col_tag.py
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/default_json.py
-,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/default_tmq_json.py
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/demo.py
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/csv-export.py
diff --git a/tests/script/test.sh b/tests/script/test.sh
index 080b1c5d1c..81e7bc2f8a 100755
--- a/tests/script/test.sh
+++ b/tests/script/test.sh
@@ -9,6 +9,9 @@
set +e
#set -x
+export ASAN_OPTIONS=detect_odr_violation=0
+echo "forbid check ODR violation."
+
FILE_NAME=
VALGRIND=0
TEST=0
diff --git a/tests/system-test/test.py b/tests/system-test/test.py
index 1958e9976e..cd0e60160c 100644
--- a/tests/system-test/test.py
+++ b/tests/system-test/test.py
@@ -40,9 +40,6 @@ import taos
import taosrest
import taosws
-from taos.cinterface import *
-taos.taos_options(6, "native")
-
def checkRunTimeError():
import win32gui
timeCount = 0
@@ -73,6 +70,7 @@ def get_local_classes_in_order(file_path):
def dynamicLoadModule(fileName):
moduleName = fileName.replace(".py", "").replace(os.sep, ".")
return importlib.import_module(moduleName, package='..')
+
#
# run case on previous cluster
#
@@ -254,9 +252,8 @@ if __name__ == "__main__":
#
# do exeCmd command
#
- taosAdapter = True # default is websocket , so must start taosAdapter
if not execCmd == "":
- if taosAdapter or restful or websocket:
+ if restful or websocket:
tAdapter.init(deployPath)
else:
tdDnodes.init(deployPath)
@@ -295,7 +292,7 @@ if __name__ == "__main__":
if valgrind:
time.sleep(2)
- if taosAdapter or restful or websocket:
+ if restful or websocket:
toBeKilled = "taosadapter"
# killCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -TERM > /dev/null 2>&1" % toBeKilled
@@ -391,7 +388,7 @@ if __name__ == "__main__":
tdDnodes.deploy(1,updateCfgDict)
tdDnodes.start(1)
tdCases.logSql(logSql)
- if taosAdapter or restful or websocket:
+ if restful or websocket:
tAdapter.deploy(adapter_cfg_dict)
tAdapter.start()
@@ -431,7 +428,7 @@ if __name__ == "__main__":
tdDnodes.starttaosd(dnode.index)
tdCases.logSql(logSql)
- if taosAdapter or restful or websocket:
+ if restful or websocket:
tAdapter.deploy(adapter_cfg_dict)
tAdapter.start()
@@ -553,7 +550,7 @@ if __name__ == "__main__":
except:
pass
- if taosAdapter or restful or websocket:
+ if restful or websocket:
tAdapter.init(deployPath, masterIp)
tAdapter.stop(force_kill=True)
@@ -563,7 +560,7 @@ if __name__ == "__main__":
tdDnodes.start(1)
tdCases.logSql(logSql)
- if taosAdapter or restful or websocket:
+ if restful or websocket:
tAdapter.deploy(adapter_cfg_dict)
tAdapter.start()
@@ -618,7 +615,7 @@ if __name__ == "__main__":
tdDnodes.starttaosd(dnode.index)
tdCases.logSql(logSql)
- if taosAdapter or restful or websocket:
+ if restful or websocket:
tAdapter.deploy(adapter_cfg_dict)
tAdapter.start()
diff --git a/tools/inc/pub.h b/tools/inc/pub.h
index fd9fa9558f..d6114a55ee 100644
--- a/tools/inc/pub.h
+++ b/tools/inc/pub.h
@@ -17,6 +17,7 @@
#define PUB_H_
#include
+#include
#include
#include
#include
@@ -72,10 +73,11 @@ int8_t getConnMode(char *arg);
char* strToLowerCopy(const char *str);
int32_t parseDsn(char* dsn, char **host, char **port, char **user, char **pwd, char* error);
-int32_t setConnMode(int8_t connMode, char *dsn);
+int32_t setConnMode(int8_t connMode, char *dsn, bool show);
uint16_t defaultPort(int8_t connMode, char *dsn);
-int8_t defaultMode(int8_t connMode, char *dsn);
+// working connect mode
+int8_t workingMode(int8_t connMode, char *dsn);
#endif // PUB_H_
\ No newline at end of file
diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c
index 209168149e..0b319ac8a1 100644
--- a/tools/shell/src/shellArguments.c
+++ b/tools/shell/src/shellArguments.c
@@ -219,9 +219,6 @@ static int32_t shellParseSingleOpt(int32_t key, char *arg) {
break;
#if defined(LINUX)
case 'o':
- printf(" -o need todo optins.\n");
- // need todo pass tsLogOutput to engine
- /*
if (strlen(arg) >= PATH_MAX) {
printf("failed to set log output since length overflow, max length is %d\r\n", PATH_MAX);
return TSDB_CODE_INVALID_CFG;
@@ -235,7 +232,6 @@ static int32_t shellParseSingleOpt(int32_t key, char *arg) {
printf("failed to expand log output: '%s' since %s\r\n", arg, tstrerror(terrno));
return terrno;
}
- */
break;
#endif
case 'E':
diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c
index 46d0c88b02..afcedeef08 100644
--- a/tools/shell/src/shellEngine.c
+++ b/tools/shell/src/shellEngine.c
@@ -1355,17 +1355,22 @@ TAOS* createConnect(SShellArgs *pArgs) {
}
// connect main
+ TAOS * taos = NULL;
if (pArgs->auth) {
- return taos_connect_auth(host, user, pArgs->auth, pArgs->database, port);
+ taos = taos_connect_auth(host, user, pArgs->auth, pArgs->database, port);
} else {
- return taos_connect(host, user, pwd, pArgs->database, port);
+ taos = taos_connect(host, user, pwd, pArgs->database, port);
}
+
+ // host user pointer in dsnc address
+ free(dsnc);
+ return taos;
}
int32_t shellExecute(int argc, char *argv[]) {
int32_t code = 0;
printf(shell.info.clientVersion, shell.info.cusName,
- defaultMode(shell.args.connMode, shell.args.dsn) == CONN_MODE_NATIVE ? STR_NATIVE : STR_WEBSOCKET,
+ workingMode(shell.args.connMode, shell.args.dsn) == CONN_MODE_NATIVE ? STR_NATIVE : STR_WEBSOCKET,
taos_get_client_info(), shell.info.cusName);
fflush(stdout);
diff --git a/tools/shell/src/shellMain.c b/tools/shell/src/shellMain.c
index 31fad97bd4..edf52da778 100644
--- a/tools/shell/src/shellMain.c
+++ b/tools/shell/src/shellMain.c
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
return -1;
}
- if (setConnMode(shell.args.connMode, shell.args.dsn)) {
+ if (setConnMode(shell.args.connMode, shell.args.dsn, false)) {
return -1;
}
diff --git a/tools/src/pub.c b/tools/src/pub.c
index 7e561b57d9..4b9389e455 100644
--- a/tools/src/pub.c
+++ b/tools/src/pub.c
@@ -91,7 +91,7 @@
}
// set conn mode
-int32_t setConnMode(int8_t connMode, char *dsn) {
+int32_t setConnMode(int8_t connMode, char *dsn, bool show) {
// check default
if (connMode == CONN_MODE_INVALID) {
if (dsn && dsn[0] != 0) {
@@ -109,11 +109,16 @@ int32_t setConnMode(int8_t connMode, char *dsn) {
fprintf(stderr, "failed to load driver. since %s [0x%08X]\r\n", taos_errstr(NULL), taos_errno(NULL));
return code;
}
+
+ if (show) {
+ fprintf(stdout, "\nConnect mode is : %s\n\n", strMode);
+ }
+
return 0;
}
// default mode
-int8_t defaultMode(int8_t connMode, char *dsn) {
+int8_t workingMode(int8_t connMode, char *dsn) {
int8_t mode = connMode;
if (connMode == CONN_MODE_INVALID) {
// no input from command line or config
@@ -129,10 +134,15 @@ int8_t defaultMode(int8_t connMode, char *dsn) {
// get default port
uint16_t defaultPort(int8_t connMode, char *dsn) {
+ // port 0 is default
+ return 0;
+
+ /*
// consistent with setConnMode
- int8_t mode = defaultMode(connMode, dsn);
+ int8_t mode = workingMode(connMode, dsn);
// default port
return mode == CONN_MODE_NATIVE ? DEFAULT_PORT_NATIVE : DEFAULT_PORT_WS_LOCAL;
+ */
}
\ No newline at end of file
diff --git a/tools/taos-tools/src/benchData.c b/tools/taos-tools/src/benchData.c
index 1a49c7f75c..917897e544 100644
--- a/tools/taos-tools/src/benchData.c
+++ b/tools/taos-tools/src/benchData.c
@@ -256,13 +256,13 @@ char* genPrepareSql(SSuperTable *stbInfo, char* tagData, uint64_t tableSeq, char
"INSERT INTO ? USING `%s`.`%s` TAGS (%s) %s VALUES(?,%s)",
db, stbInfo->stbName, tagQ, ttl, colQ);
} else {
- if (g_arguments->connMode == CONN_MODE_NATIVE) {
+ if (workingMode(g_arguments->connMode, g_arguments->dsn) == CONN_MODE_NATIVE) {
// native
n = snprintf(prepare + len, TSDB_MAX_ALLOWED_SQL_LEN - len,
"INSERT INTO ? VALUES(?,%s)", colQ);
} else {
// websocket
- bool ntb = stbInfo->tags == NULL || stbInfo->tags->size == 0; // nomral table
+ bool ntb = stbInfo->tags == NULL || stbInfo->tags->size == 0; // normal table
colNames = genColNames(stbInfo->cols, !ntb);
n = snprintf(prepare + len, TSDB_MAX_ALLOWED_SQL_LEN - len,
"INSERT INTO `%s`.`%s`(%s) VALUES(%s,%s)", db, stbInfo->stbName, colNames,
diff --git a/tools/taos-tools/src/benchMain.c b/tools/taos-tools/src/benchMain.c
index fa47329b37..190defa5a7 100644
--- a/tools/taos-tools/src/benchMain.c
+++ b/tools/taos-tools/src/benchMain.c
@@ -168,7 +168,7 @@ int main(int argc, char* argv[]) {
}
// conn mode
- if (setConnMode(g_arguments->connMode, g_arguments->dsn) != 0) {
+ if (setConnMode(g_arguments->connMode, g_arguments->dsn, true) != 0) {
exitLog();
return -1;
}
diff --git a/tools/taos-tools/src/taosdump.c b/tools/taos-tools/src/taosdump.c
index 6ef633fb9b..5d513a3ba6 100644
--- a/tools/taos-tools/src/taosdump.c
+++ b/tools/taos-tools/src/taosdump.c
@@ -150,6 +150,7 @@ static struct argp_option options[] = {
{"inspect", 'I', 0, 0,
"inspect avro file content and print on screen", 10},
{"no-escape", 'n', 0, 0, "No escape char '`'. Default is using it.", 10},
+ {"restful", 'R', 0, 0, "Use RESTful interface to connect server", 11},
{"cloud", 'C', "CLOUD_DSN", 0, OLD_DSN_DESC, 11},
{"timeout", 't', "SECONDS", 0, "The timeout seconds for "
"websocket to interact."},
@@ -691,7 +692,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
}
g_args.thread_num = atoi((const char *)arg);
break;
-
+ case 'R':
+ warnPrint("%s\n", "'-R' is not supported, ignore this options.");
+ break;
case 'C':
case 'X':
if (arg) {
@@ -10910,7 +10913,7 @@ int main(int argc, char *argv[]) {
}
// conn mode
- if (setConnMode(g_args.connMode, g_args.dsn) != 0) {
+ if (setConnMode(g_args.connMode, g_args.dsn, true) != 0) {
return -1;
}
From d00f5e332d5e10c052dc29617e4093ff32861769 Mon Sep 17 00:00:00 2001
From: Jing Sima
Date: Sat, 22 Mar 2025 21:12:25 +0800
Subject: [PATCH 18/26] docs: [TS-4897] Add docs for virtual table. (#30325)
* docs: [TS-4897] Add docs for virtual table.
* Update 01-model.md
* Update 01-model.md
* docs: [TS-4897] Modify docs of virtual table.
---------
Co-authored-by: Pan Wei <72057773+dapan1121@users.noreply.github.com>
---
docs/zh/05-basic/01-model.md | 191 +++++++++++
.../zh/05-basic/data-model-origin-table-2.png | Bin 0 -> 56202 bytes
docs/zh/05-basic/data-model-origin-table.png | Bin 0 -> 54631 bytes
docs/zh/14-reference/03-taos-sql/04-stable.md | 2 +
docs/zh/14-reference/03-taos-sql/22-meta.md | 48 +--
.../03-taos-sql/34-virtualtable.md | 311 ++++++++++++++++++
.../pic/virtual-table-origin-table.png | Bin 0 -> 7998 bytes
.../pic/virtual-table-query-res-part.png | Bin 0 -> 3194 bytes
.../pic/virtual-table-query-res.png | Bin 0 -> 5027 bytes
9 files changed, 529 insertions(+), 23 deletions(-)
create mode 100644 docs/zh/05-basic/data-model-origin-table-2.png
create mode 100644 docs/zh/05-basic/data-model-origin-table.png
create mode 100644 docs/zh/14-reference/03-taos-sql/34-virtualtable.md
create mode 100644 docs/zh/14-reference/03-taos-sql/pic/virtual-table-origin-table.png
create mode 100644 docs/zh/14-reference/03-taos-sql/pic/virtual-table-query-res-part.png
create mode 100644 docs/zh/14-reference/03-taos-sql/pic/virtual-table-query-res.png
diff --git a/docs/zh/05-basic/01-model.md b/docs/zh/05-basic/01-model.md
index fc5c3a0a2e..0f01fbf562 100644
--- a/docs/zh/05-basic/01-model.md
+++ b/docs/zh/05-basic/01-model.md
@@ -77,6 +77,22 @@ toc_max_heading_level: 4

+### 虚拟表
+
+“一个设备一张表”的设计解决了工业和物联网等场景下的大多数时序数据管理和分析难题,但是在遇到更复杂的场景时,这种设计受到了设备复杂性的挑战。这种复杂性的根源在于一个设备无法简单的用一个或一组数据采集点来描述或管理,而业务分析往往需要综合多个或多组采集点的数据才能完成。以汽车或发电风机为例,整个设备(汽车或风机)中含有非常大量的传感器(数据采集点),这些传感器的输出和采集频率千差万别。一个超级表只能描述其中一种传感器,当需要综合多个传感器的数据进行分析计算时,只能通过多级关联查询的方式来进行,而这往往会导致易用性和性能方面的问题。
+
+为了解决这个问题,TDengine 引入虚拟表(Virtual Table,简称为 VTable)的概念。虚拟表是一种不存储实际数据而可以用于分析计算的表,它的数据来源为其它真实存储数据的子表、普通表,通过将不同列数据按照时间戳排序、对齐、合并的方式来生成虚拟表。同真实表类似,虚拟表也可以分为虚拟超级表、虚拟子表、虚拟普通表。虚拟超级表可以是一个设备或一组分析计算所需数据的完整集合,每个虚拟子表可以根据需要引用相同或不同的列,因此可以灵活地根据业务需要进行定义,最终可以达到千表千面的效果。虚拟表不能写入、删除数据,在查询使用上同真实表基本相同,支持虚拟超级表、虚拟子表、虚拟普通表上的任何查询。唯一的区别在于虚拟表的数据是每次查询计算时动态生成的,只有一个查询中引用的列才会被合并进虚拟表中,因此同一个虚拟表在不同的查询中所呈现的数据可能是不同的。
+
+虚拟超级表的主要功能特点包括:
+1. 列选择与拼接
+ 用户可以从多个原始表中选择指定的列,按需组合到一张虚拟表中,形成统一的数据视图。
+2. 基于时间戳对齐
+ 以时间戳为依据对数据进行对齐,如果多个表在相同时间戳下存在数据,则对应列的值组合成同一行;若部分表在该时间戳下无数据,则对应列填充为 NULL。
+3. 动态更新
+ 虚拟表根据原始表的数据变化自动更新,确保数据的实时性。虚拟表不需实际存储,计算在生成时动态完成。
+
+通过引入虚拟表的概念,现在 TDengine 可以非常方便的管理更大更复杂的设备数据。无论每个采集点如何建模(单列 or 多列),无论这些采集点的数据是分布在一个或多个库中,我们现在都可以通过定义虚拟子表的方式跨库跨表任意指定数据源,通过虚拟超级表的方式进行跨设备、跨分析的聚合运算,从此“一个设备一张表”彻底成为现实。
+
### 库
库是 TDengine 中用于管理一组表的集合。TDengine 允许一个运行实例包含多个库,并且每个库都可以配置不同的存储策略。由于不同类型的数据采集点通常具有不同的数据特征,如数据采集频率、数据保留期限、副本数量、数据块大小等。为了在各种场景下确保 TDengine 能够发挥最大效率,建议将具有不同数据特征的超级表创建在不同的库中。
@@ -93,6 +109,7 @@ toc_max_heading_level: 4
在查询数据时,TDengine 客户端会根据应用程序当前的时区设置,自动将保存的 UTC 时间戳转换成本地时间进行显示,确保用户在不同时区下都能看到正确的时间信息。
+
## 数据建模
本节用智能电表做例子,简要的介绍如何在 TDengine 里使用 SQL 创建数据库、超级表、表的基本操作。
@@ -215,3 +232,177 @@ TDengine 支持灵活的数据模型设计,包括多列模型和单列模型
尽管 TDengine 推荐使用多列模型,因为这种模型在写入效率和存储效率方面通常更优,但在某些特定场景下,单列模型可能更为适用。例如,当一个数据采集点的采集量种类经常发生变化时,如果采用多列模型,就需要频繁修改超级表的结构定义,这会增加应用程序的复杂性。在这种情况下,采用单列模型可以简化应用程序的设计和管理,因为它允许独立地管理和扩展每个物理量的超级表。
总之,TDengine 提供了灵活的数据模型选项,用户可以根据实际需求和场景选择最适合的模型,以优化性能和管理复杂性。
+
+### 创建虚拟表
+
+无论是选择单列模型还是多列模型,TDengine 都可以通过使用虚拟表进行跨表的运算。为智能电表为例,这里介绍虚拟表的两种使用场景:
+
+1. 单源多维度时序聚合
+2. 跨源采集量对比分析
+
+#### 单源多维度时序聚合
+在单源多维度时序聚合场景中,“单源”并非指单一物理表,而是指来自**同一数据采集点**下的多个单列时序数据表。这些数据因业务需求或其他限制被拆分为多个单列存储的表,但通过设备标签和时间基准保持逻辑一致性。虚拟表在此场景中的作用是将一个采集点中“纵向“拆分的数据,还原为完整的“横向”状态。
+例如,在建模时采用了单列模型,对于电流、电压和相位这 3 种物理量,分别建立 3 张超级表。在这种场景下,用户可以通过虚拟表将这 3 种不同的采集量聚合到一张表中,以便进行统一的查询和分析。
+
+创建单列模型的超级表的 SQL 如下:
+
+```sql
+
+CREATE STABLE current_stb (
+ ts timestamp,
+ current float
+) TAGS (
+ device_id varchar(64),
+ location varchar(64),
+ group_id int
+);
+
+CREATE STABLE voltage_stb (
+ ts timestamp,
+ voltage int
+) TAGS (
+ device_id varchar(64),
+ location varchar(64),
+ group_id int
+);
+
+CREATE STABLE phase_stb (
+ ts timestamp,
+ phase float
+) TAGS (
+ device_id varchar(64),
+ location varchar(64),
+ group_id int
+);
+```
+
+假设分别有 d1001,d1002,d1003,d1004 四个设备,分别对四个设备的电流、电压、相位采集量创建子表,SQL 如下:
+
+```sql
+create table current_d1001 using current_stb(deviceid, location, group_id) tags("d1001", "California.SanFrancisco", 2);
+create table current_d1002 using current_stb(deviceid, location, group_id) tags("d1002", "California.SanFrancisco", 3);
+create table current_d1003 using current_stb(deviceid, location, group_id) tags("d1003", "California.LosAngeles", 3);
+create table current_d1004 using current_stb(deviceid, location, group_id) tags("d1004", "California.LosAngeles", 2);
+
+create table voltage_d1001 using voltage_stb(deviceid, location, group_id) tags("d1001", "California.SanFrancisco", 2);
+create table voltage_d1002 using voltage_stb(deviceid, location, group_id) tags("d1002", "California.SanFrancisco", 3);
+create table voltage_d1003 using voltage_stb(deviceid, location, group_id) tags("d1003", "California.LosAngeles", 3);
+create table voltage_d1004 using voltage_stb(deviceid, location, group_id) tags("d1004", "California.LosAngeles", 2);
+
+create table phase_d1001 using phase_stb(deviceid, location, group_id) tags("d1001", "California.SanFrancisco", 2);
+create table phase_d1002 using phase_stb(deviceid, location, group_id) tags("d1002", "California.SanFrancisco", 3);
+create table phase_d1003 using phase_stb(deviceid, location, group_id) tags("d1003", "California.LosAngeles", 3);
+create table phase_d1004 using phase_stb(deviceid, location, group_id) tags("d1004", "California.LosAngeles", 2);
+```
+
+此时想要通过一张虚拟超级表来讲这三种采集量聚合到一张表中,创建虚拟超级表 SQL 如下:
+
+```sql
+CREATE STABLE meters_v (
+ ts timestamp,
+ current float,
+ voltage int,
+ phase float
+) TAGS (
+ location varchar(64),
+ group_id int
+) VIRTUAL 1;
+```
+
+并且对四个设备 d1001,d1002,d1003,d1004 分别创建虚拟子表,SQL 如下:
+
+```sql
+CREATE VTABLE d1001_v (
+ current from current_d1001.current,
+ voltage from voltage_d1001.voltage,
+ phase from phase_d1001.phase
+)
+USING meters_v
+TAGS (
+ "California.SanFrancisco",
+ 2
+);
+
+CREATE VTABLE d1002_v (
+ current from current_d1002.current,
+ voltage from voltage_d1002.voltage,
+ phase from phase_d1002.phase
+)
+USING meters_v
+TAGS (
+ "California.SanFrancisco",
+ 3
+);
+
+CREATE VTABLE d1003_v (
+ current from current_d1003.current,
+ voltage from voltage_d1003.voltage,
+ phase from phase_d1003.phase
+)
+USING meters_v
+TAGS (
+ "California.LosAngeles",
+ 3
+);
+
+CREATE VTABLE d1004_v (
+ current from current_d1004.current,
+ voltage from voltage_d1004.voltage,
+ phase from phase_d1004.phase
+)
+USING meters_v
+TAGS (
+ "California.LosAngeles",
+ 2
+);
+```
+
+以设备 d1001 为例,假设 d1001 设备的电流、电压、相位数据如下:
+
+
+
+虚拟表 d1001_v 中的数据如下 :
+
+| Timestamp | Current | Voltage | Phase |
+|:--------------:|:-------:|:---------:|:-------:|
+| 1538548685000 | 10.3 | 219 | 0.31 |
+| 1538548695000 | 12.6 | 218 | 0.33 |
+| 1538548696800 | 12.3 | 221 | 0.31 |
+| 1538548697100 | 12.1 | 220 | NULL |
+| 1538548697200 | NULL | NULL | 0.32 |
+| 1538548697700 | 11.8 | NULL | NULL |
+| 1538548697800 | NULL | 222 | 0.33 |
+
+#### 跨源采集量对比分析
+
+在跨源采集量对比分析中,“跨源”指数据来自**不同数据采集点**。在不同数据采集点中提取具有可比语义的采集量,通过虚拟表将这些采集量按照时间戳进行对齐和合并,并进行对比分析。
+例如,用户可以将来自不同设备的电流数据聚合到一张虚拟表中,以便进行电流数据的对比分析。
+
+以分析 d1001, d1002, d1003, d1004 四个设备的电流数据为例,创建虚拟表的 SQL 如下:
+
+```sql
+CREATE VTABLE current_v (
+ ts timestamp,
+ d1001_current float from current_d1001.current,
+ d1002_current float from current_d1002.current,
+ d1003_current float from current_d1003.current,
+ d1004_current float from current_d1004.current
+);
+```
+
+假设 d1001, d1002, d1003, d1004 四个设备的电流数据如下:
+
+
+
+虚拟表 current_v 中的数据如下:
+
+| Timestamp | d1001_current | d1002_current | d1003_current | d1004_current |
+|:--------------:|:-------------:|:-------------:|:-------------:|:-------------:|
+| 1538548685000 | 10.3 | 11.7 | 11.2 | 12.4 |
+| 1538548695000 | 12.6 | 11.9 | 10.8 | 11.3 |
+| 1538548696800 | 12.3 | 12.4 | 12.3 | 10.1 |
+| 1538548697100 | 12.1 | NULL | 11.1 | NULL |
+| 1538548697200 | NULL | 12.2 | NULL | 11.7 |
+| 1538548697700 | 11.8 | 11.4 | NULL | NULL |
+| 1538548697800 | NULL | NULL | 12.1 | 12.6 |
+
diff --git a/docs/zh/05-basic/data-model-origin-table-2.png b/docs/zh/05-basic/data-model-origin-table-2.png
new file mode 100644
index 0000000000000000000000000000000000000000..8d0e203b4e11f02bf24512e8cfc336021b285b31
GIT binary patch
literal 56202
zcmafb1z1#D+cqLdN~hA@Es{fnG)Q-sfOHQjA&nr?jUX-EDJcz7O6L&50E0C1?>X=L
z)qBo${mwPao>_avUh7$L-_QLRt)Zsy6!RG-5)#r=#aFVgk&qsH0@vs0Pk_G@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