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/10] 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/10] 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 fb469935123b05547df04ad7b0172de306fe023f Mon Sep 17 00:00:00 2001 From: WANG MINGMING Date: Fri, 21 Mar 2025 22:36:37 +0800 Subject: [PATCH 03/10] 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 04/10] 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 05/10] 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 06/10] 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 07/10] 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 08/10] 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 53fb1fa63628a33d4b80e8c0b7153af07861240e Mon Sep 17 00:00:00 2001 From: WANG Xu Date: Sat, 22 Mar 2025 13:36:29 +0800 Subject: [PATCH 09/10] 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 42dbebaff7b738e10d27ca83233e2476be0b761a Mon Sep 17 00:00:00 2001 From: WANG Xu Date: Sat, 22 Mar 2025 14:29:04 +0800 Subject: [PATCH 10/10] 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 @@

-[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/taosdata/tdengine/tdengine-test.yml)](https://github.com/taosdata/TDengine/actions/workflows/tdengine-test.yml) +[![TDengine Release Build](https://github.com/taosdata/TDengine/actions/workflows/tdengine-release-build.yml/badge.svg)](https://github.com/taosdata/TDengine/actions/workflows/tdengine-release-build.yml) [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=3.0)](https://coveralls.io/github/taosdata/TDengine?branch=3.0) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/taosdata/tdengine)](https://github.com/feici02/TDengine/commits/main/)