Merge branch 'main' into tomchon-patch-12
This commit is contained in:
commit
d4b860d7e7
|
@ -1,4 +1,5 @@
|
||||||
name: Cancel Workflow on Merge or Close
|
name: Cancel Workflow on Merge or Close
|
||||||
|
description: Cancels the workflow if the PR is merged or closed to avoid unnecessary runs.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
name: TDengine CI Test Manually
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
specified_source_branch:
|
||||||
|
description: 'Enter the source branch name of TDengine'
|
||||||
|
required: false
|
||||||
|
default: 'unavailable'
|
||||||
|
type: string
|
||||||
|
specified_target_branch:
|
||||||
|
description: 'Enter the target branch name of TDengine'
|
||||||
|
required: false
|
||||||
|
default: 'unavailable'
|
||||||
|
type: string
|
||||||
|
specified_pr_number:
|
||||||
|
description: 'Enter the PR number of TDengine'
|
||||||
|
required: false
|
||||||
|
default: 'unavailable'
|
||||||
|
type: string
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.event.inputs.specified_target_branch }}-${{ github.event.inputs.specified_pr_number }}-TDengine
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
WKC: '/var/lib/jenkins/workspace/TDinternal/community'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-tests-on-linux:
|
||||||
|
uses: taosdata/.github/.github/workflows/run-tests-on-linux.yml@ci/test/workflow
|
||||||
|
with:
|
||||||
|
tdinternal: false
|
||||||
|
run_function_test: true
|
||||||
|
run_tdgpt_test: false
|
||||||
|
specified_source_branch: ${{ github.event.inputs.specified_source_branch }}
|
||||||
|
specified_target_branch: ${{ github.event.inputs.specified_target_branch }}
|
||||||
|
specified_pr_number: ${{ github.event.inputs.specified_pr_number }}
|
||||||
|
|
||||||
|
run-tests-on-mac:
|
||||||
|
uses: taosdata/.github/.github/workflows/run-tests-on-macos.yml@ci/test/workflow
|
||||||
|
with:
|
||||||
|
tdinternal: false
|
||||||
|
specified_source_branch: ${{ github.event.inputs.specified_source_branch }}
|
||||||
|
specified_target_branch: ${{ github.event.inputs.specified_target_branch }}
|
||||||
|
specified_pr_number: ${{ github.event.inputs.specified_pr_number }}
|
||||||
|
|
||||||
|
run-tests-on-windows:
|
||||||
|
uses: taosdata/.github/.github/workflows/run-tests-on-windows.yml@ci/test/workflow
|
||||||
|
with:
|
||||||
|
tdinternal: false
|
||||||
|
specified_source_branch: ${{ github.event.inputs.specified_source_branch }}
|
||||||
|
specified_target_branch: ${{ github.event.inputs.specified_target_branch }}
|
||||||
|
specified_pr_number: ${{ github.event.inputs.specified_pr_number }}
|
12
README.md
12
README.md
|
@ -29,9 +29,9 @@ English | [简体中文](README-CN.md) | [TDengine Cloud](https://cloud.tdengine
|
||||||
1. [Introduction](#1-introduction)
|
1. [Introduction](#1-introduction)
|
||||||
1. [Documentation](#2-documentation)
|
1. [Documentation](#2-documentation)
|
||||||
1. [Prerequisites](#3-prerequisites)
|
1. [Prerequisites](#3-prerequisites)
|
||||||
- [3.1 Prerequisites On Linux](#31-on-linux)
|
- [3.1 Prerequisites On Linux](#31-prerequisites-on-linux)
|
||||||
- [3.2 Prerequisites On macOS](#32-on-macos)
|
- [3.2 Prerequisites On macOS](#32-prerequisites-on-macos)
|
||||||
- [3.3 Prerequisites On Windows](#33-on-windows)
|
- [3.3 Prerequisites On Windows](#33-prerequisites-on-windows)
|
||||||
- [3.4 Clone the repo](#34-clone-the-repo)
|
- [3.4 Clone the repo](#34-clone-the-repo)
|
||||||
1. [Building](#4-building)
|
1. [Building](#4-building)
|
||||||
- [4.1 Build on Linux](#41-build-on-linux)
|
- [4.1 Build on Linux](#41-build-on-linux)
|
||||||
|
@ -84,7 +84,7 @@ At the moment, TDengine server supports running on Linux/Windows/MacOS systems.
|
||||||
|
|
||||||
If you want to compile taosAdapter or taosKeeper, you need to install Go 1.18 or above.
|
If you want to compile taosAdapter or taosKeeper, you need to install Go 1.18 or above.
|
||||||
|
|
||||||
## 3.1 On Linux
|
## 3.1 Prerequisites on Linux
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ yum install -y zlib-static xz-devel snappy-devel jansson-devel pkgconfig libatom
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 3.2 On macOS
|
## 3.2 Prerequisites on macOS
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ brew install argp-standalone gflags pkgconfig
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 3.3 On Windows
|
## 3.3 Prerequisites on Windows
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ Power BI is a business analytics tool provided by Microsoft. By configuring the
|
||||||
|
|
||||||
## Configure Data Source
|
## Configure Data Source
|
||||||
|
|
||||||
**Step 1**, Search and open the [ODBC Data Source (64 bit)] management tool in the Start menu of the Windows operating system and configure it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#Installation).
|
**Step 1**, Search and open the [ODBC Data Source (64 bit)] management tool in the Start menu of the Windows operating system and configure it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#installation).
|
||||||
|
|
||||||
**Step 2**, Open Power BI and log in, click [Home] -> [Get Data] -> [Other] -> [ODBC] -> [Connect], add data source.
|
**Step 2**, Open Power BI and log in, click [Home] -> [Get Data] -> [Other] -> [ODBC] -> [Connect], add data source.
|
||||||
|
|
||||||
**Step 3**, Select the data source name just created, such as [MyTDengine], if you need to enter SQL, you can click the [Advanced options] tab, in the expanded dialog box enter the SQL statement. Click the [OK] button to connect to the configured data source.
|
**Step 3**, Select the data source name just created, such as [MyTDengine], if you need to enter SQL, you can click the [Advanced options] tab, in the expanded dialog box enter the SQL statement. Click the [OK] button to connect to the configured data source.
|
||||||
|
|
|
@ -13,11 +13,11 @@ Prepare the following environment:
|
||||||
- TDengine 3.3.5.8 and above version is installed and running normally (both Enterprise and Community versions are available).
|
- TDengine 3.3.5.8 and above version is installed and running normally (both Enterprise and Community versions are available).
|
||||||
- taosAdapter is running normally, refer to [taosAdapter Reference](../../../tdengine-reference/components/taosadapter/).
|
- taosAdapter is running normally, refer to [taosAdapter Reference](../../../tdengine-reference/components/taosadapter/).
|
||||||
- Install and run Tableau Desktop (if not installed, please download and install Windows operating system 64-bit [Download Tableau Desktop](https://www.tableau.com/products/desktop/download)). Install Tableau please refer to [Tableau Desktop](https://www.tableau.com).
|
- Install and run Tableau Desktop (if not installed, please download and install Windows operating system 64-bit [Download Tableau Desktop](https://www.tableau.com/products/desktop/download)). Install Tableau please refer to [Tableau Desktop](https://www.tableau.com).
|
||||||
- Download the latest Windows operating system X64 client driver from the TDengine official website and install it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#Installation).
|
- Download the latest Windows operating system X64 client driver from the TDengine official website and install it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#installation).
|
||||||
|
|
||||||
## Configure Data Source
|
## Configure Data Source
|
||||||
|
|
||||||
**Step 1**, Search and open the "ODBC Data Source (64 bit)" management tool in the Start menu of the Windows operating system and configure it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#Installation).
|
**Step 1**, Search and open the "ODBC Data Source (64 bit)" management tool in the Start menu of the Windows operating system and configure it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#installation).
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
It should be noted that when configuring the ODBC data source for Tableau, the [Database] configuration item on the TDengine ODBC data source configuration page is required. You need to select a database that can be successfully connected.
|
It should be noted that when configuring the ODBC data source for Tableau, the [Database] configuration item on the TDengine ODBC data source configuration page is required. You need to select a database that can be successfully connected.
|
||||||
|
|
|
@ -13,12 +13,12 @@ Prepare the following environment:
|
||||||
- TDengine 3.3.5.8 and above version is installed and running normally (both Enterprise and Community versions are available).
|
- TDengine 3.3.5.8 and above version is installed and running normally (both Enterprise and Community versions are available).
|
||||||
- taosAdapter is running normally, refer to [taosAdapter Reference](../../../tdengine-reference/components/taosadapter/).
|
- taosAdapter is running normally, refer to [taosAdapter Reference](../../../tdengine-reference/components/taosadapter/).
|
||||||
- Install and run Excel. If not installed, please download and install it. For specific instructions, please refer to Microsoft's official documentation.
|
- Install and run Excel. If not installed, please download and install it. For specific instructions, please refer to Microsoft's official documentation.
|
||||||
- Download the latest Windows operating system X64 client driver from the TDengine official website and install it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#Installation).
|
- Download the latest Windows operating system X64 client driver from the TDengine official website and install it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#installation).
|
||||||
|
|
||||||
## Configure Data Source
|
## Configure Data Source
|
||||||
|
|
||||||
**Step 1**, Search and open the [ODBC Data Source (64 bit)] management tool in the Start menu of the Windows operating system and configure it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#Installation).
|
**Step 1**, Search and open the [ODBC Data Source (64 bit)] management tool in the Start menu of the Windows operating system and configure it, refer to [Install ODBC Driver](../../../tdengine-reference/client-libraries/odbc/#installation).
|
||||||
|
|
||||||
**Step 2**, Start Excel in the Windows system environment, then select [Data] -> [Get Data] -> [From Other Sources] -> [From ODBC].
|
**Step 2**, Start Excel in the Windows system environment, then select [Data] -> [Get Data] -> [From Other Sources] -> [From ODBC].
|
||||||
|
|
||||||

|

|
||||||
|
|
|
@ -6615,12 +6615,12 @@ int32_t blockDBUsageFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
||||||
|
|
||||||
uint64_t totalDiskSize = pData->dataInDiskSize;
|
uint64_t totalDiskSize = pData->dataInDiskSize;
|
||||||
uint64_t rawDataSize = pData->rawDataSize;
|
uint64_t rawDataSize = pData->rawDataSize;
|
||||||
double compressRadio = 0;
|
double compressRatio = 0;
|
||||||
if (rawDataSize != 0) {
|
if (rawDataSize != 0) {
|
||||||
compressRadio = totalDiskSize * 100 / (double)rawDataSize;
|
compressRatio = totalDiskSize * 100 / (double)rawDataSize;
|
||||||
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_radio=[%.2f%]", compressRadio);
|
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_ratio=[%.2f%]", compressRatio);
|
||||||
} else {
|
} else {
|
||||||
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_radio=[NULL]");
|
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_ratio=[NULL]");
|
||||||
}
|
}
|
||||||
|
|
||||||
varDataSetLen(st, len);
|
varDataSetLen(st, len);
|
||||||
|
|
|
@ -182,7 +182,7 @@ void compressImplTestByAlg(void* pVal, int8_t type, int32_t num, uint32_t
|
||||||
|
|
||||||
DEFINE_VAR(cmprAlg)
|
DEFINE_VAR(cmprAlg)
|
||||||
int32_t len = compres.compFunc(pVal, bytes, num, px, externalSize, cmprAlg, pBuf, externalSize);
|
int32_t len = compres.compFunc(pVal, bytes, num, px, externalSize, cmprAlg, pBuf, externalSize);
|
||||||
printf("encode:%s, compress alg:%s, type:%s, compresess size: %d, actual size: %d, radio: %f\n", end[l1], alg[l2],
|
printf("encode:%s, compress alg:%s, type:%s, compresess size: %d, actual size: %d, ratio: %f\n", end[l1], alg[l2],
|
||||||
compres.name, len, bytes, (float)len / bytes);
|
compres.name, len, bytes, (float)len / bytes);
|
||||||
char* pOutput = static_cast<char*>(taosMemoryCalloc(1, externalSize));
|
char* pOutput = static_cast<char*>(taosMemoryCalloc(1, externalSize));
|
||||||
memset(pBuf, 0, externalSize);
|
memset(pBuf, 0, externalSize);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
# expressly provided by the written permission from Jianhui Tao
|
# expressly provided by the written permission from Jianhui Tao
|
||||||
#
|
#
|
||||||
###################################################################
|
###################################################################
|
||||||
|
import time
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
@ -88,6 +89,17 @@ class TDTestCase:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def restart_stream(self):
|
def restart_stream(self):
|
||||||
|
st = time.time()
|
||||||
|
while True:
|
||||||
|
sql = 'select status from information_schema.ins_stream_tasks where status<>"ready" '
|
||||||
|
if len(tdSql.getResult(sql)) != 0:
|
||||||
|
time.sleep(1)
|
||||||
|
tdLog.info("wait for task to be ready, 1s")
|
||||||
|
else:
|
||||||
|
et = time.time()
|
||||||
|
tdLog.info(f"wait for tasks to be ready: {et-st}s")
|
||||||
|
break
|
||||||
|
|
||||||
tdLog.debug("========restart stream========")
|
tdLog.debug("========restart stream========")
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
tdSql.execute("pause stream s1")
|
tdSql.execute("pause stream s1")
|
||||||
|
|
Loading…
Reference in New Issue