diff --git a/CONTRIBUTING-CN.md b/CONTRIBUTING-CN.md index 19f3000d45..efaa2077fe 100644 --- a/CONTRIBUTING-CN.md +++ b/CONTRIBUTING-CN.md @@ -7,25 +7,18 @@ - 任何用户都可以通过 **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)** 向我们报告错误。请您对所遇到的问题进行**详细描述**,最好提供重现错误的详细步骤。 - 欢迎提供包含由 Bug 生成的日志文件的附录。 -## 需要强调的代码提交规则 +## 代码提交规则 -- 在提交代码之前,需要**同意贡献者许可协议(CLA)**。点击 [TaosData CLA](https://cla-assistant.io/taosdata/TDengine) 阅读并签署协议。如果您不接受该协议,请停止提交。 -- 请在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中解决问题或添加注册功能。 -- 如果在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中没有找到相应的问题或功能,请**创建一个新的 issue**。 -- 将代码提交到我们的存储库时,请创建**包含问题编号的 PR**。 +1. 在提交代码之前,需要**同意贡献者许可协议(CLA)**。点击 [TaosData CLA](https://cla-assistant.io/taosdata/TDengine) 阅读并签署协议。如果您不接受该协议,请停止提交。 +2. 请在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中解决问题或添加注册功能。 + 如果在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中没有找到相应的问题或功能,请**创建一个新的 issue**。 + 将代码提交到我们的存储库时,请创建**包含问题编号的 PR**。 +3. 将TDengine仓库库fork到自己的账户中并创建分支(branch)。 + 注意:默认分支`main`不能直接接受PR,请基于开发分支`3.0`创建自己的分支。 + 注意:修改文档的分支要以`docs/`为开头,以免进行不必要的测试。 +4. 创建pull request,将自己的分支合并到开发分支`3.0`,我们开发团队将尽快审核。 -## 贡献指南 - -1. 请用友好的语气书写。 - -2. **主动语态**总体上优于被动语态。主动语态中的句子会突出执行动作的人,而不是被动语态突出动作的接受者。 - -3. 文档写作建议 - -- 正确拼写产品名称 “TDengine”。 “TD” 用大写字母,“TD” 和 “engine” 之间没有空格 **(正确拼写:TDengine)**。 -- 在句号或其他标点符号后只留一个空格。 - -4. 尽量**使用简单句**,而不是复杂句。 +如遇任何问题,请添加官方微信TDengineECO。我们的团队会帮忙解决。 ## 给贡献者的礼品 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5be84bec34..058c624e10 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,40 +1,36 @@ -# Contributing +# Contributing to TDengine -We appreciate contributions from all developers. Feel free to follow us, fork the repository, report bugs, and even submit your code on GitHub. However, we would like developers to follow the guidelines in this document to ensure effective cooperation. +TDengine Community Edition is free, open-source software. Its development is led by the TDengine Team, but we welcome contributions from all community members and open-source developers. This document describes how you can contribute, no matter whether you're a user or a developer yourself. -## Reporting a bug +## Bug reports -- Any users can report bugs to us through the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**. We would appreciate if you could provide **a detailed description** of the problem you encountered, including steps to reproduce it. +All users can report bugs to us through the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**. To ensure that the development team can locate and resolve the issue that you experienced, please include the following in your bug report: -- Attaching log files caused by the bug is really appreciated. +- A detailed description of the issue, including the steps to reproduce it. +- Any log files that may be relevant to the issue. -## Guidelines for committing code +## Code contributions -- You must agree to the **Contributor License Agreement(CLA) before submitting your code patch**. Follow the **[TAOSData CLA](https://cla-assistant.io/taosdata/TDengine)** link to read through and sign the agreement. If you do not accept the agreement, your contributions cannot be accepted. +Developers are encouraged to submit patches to the project, and all contributions, from minor documentation changes to bug fixes, are appreciated by our team. To ensure that your code can be merged successfully and improve the experience for other community members, we ask that you go through the following procedure before submitting a pull request: -- Please solve an issue or add a feature registered in the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**. -- If no corresponding issue or feature is found in the issue tracker, please **create one**. -- When submitting your code to our repository, please create a pull request with the **issue number** included. +1. Read and accept the terms of the TAOS Data Contributor License Agreement (CLA) located at [https://cla-assistant.io/taosdata/TDengine](https://cla-assistant.io/taosdata/TDengine). -## Guidelines for communicating +2. For bug fixes, search the [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) to check whether the bug has already been filed. + - If the bug that you want to fix already exists in the issue tracker, review the previous discussion before submitting your patch. + - If the bug that you want to fix does not exist in the issue tracker, click **New issue** and file a report. + - Ensure that you note the issue number in your pull request when you submit your patch. + +3. Fork our repository to your GitHub account and create a branch for your patch. + **Important:** The `main` branch is for stable versions and cannot accept patches directly. For all code and documentation changes, create your own branch from the development branch `3.0` and not from `main`. + Note: For a documentation change, ensure that the branch name starts with `docs/` so that the change can be merged without running tests. + +4. Create a pull request to merge your changes into the development branch `3.0`, and our team members will review the request as soon as possible. -1. Please be **nice and polite** in the description. -2. **Active voice is better than passive voice in general**. Sentences in the active voice will highlight who is performing the action rather than the recipient of the action highlighted by the passive voice. -3. Documentation writing advice +If you encounter any difficulties or problems in contributing your code, you can join our [Discord server](https://discord.com/invite/VZdSuUg4pS) and receive assistance from members of the TDengine Team. -- Spell the product name "TDengine" correctly. "TD" is written in capital letters, and there is no space between "TD" and "engine" (**Correct spelling: TDengine**). -- Please **capitalize the first letter** of every sentence. -- Leave **only one space** after periods or other punctuation marks. -- Use **American spelling**. -- When possible, **use second person** rather than first person (e.g.“You are recommended to use a reverse proxy such as Nginx.” rather than “We recommend to use a reverse proxy such as Nginx.”). +## Expressing our thanks -5. Use **simple sentences**, rather than complex sentences. - -## Gifts for the contributors - -Developers, as long as you contribute to TDengine, whether it's code contributions to fix bugs or feature requests, or documentation changes, **you are eligible for a very special Contributor Souvenir Gift!** - -**You can choose one of the following gifts:** +To thank community members for your support, we are offering a free gift to any developer who submits at least one contribution. You can choose one of the following items:
-The TDengine community is committed to making TDengine accepted and used by more developers.
+If you would like to claim your gift, send an email to [developer@tdengine.com](mailto:developer@tdengine.com?subject=Claiming&20my%20developer%20gift) including the following information:
-Just fill out the **Contributor Submission Form** to choose your desired gift.
+- Your GitHub account name
+- Your name and mailing address
+- Your preferred gift
-- [Contributor Submission Form](https://page.ma.scrmtech.com/form/index?pf_uid=27715_2095&id=12100)
-
-## Contact us
-
-If you have any problems or questions that need help from us, please feel free to add our WeChat account: TDengineECO.
+Note: Limit one per person.
\ No newline at end of file
diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in
index 82a7052125..b996ffcd17 100644
--- a/cmake/taostools_CMakeLists.txt.in
+++ b/cmake/taostools_CMakeLists.txt.in
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
- GIT_TAG 23e2b73
+ GIT_TAG e00ebd9
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
diff --git a/docs/en/14-reference/03-connector/index.mdx b/docs/en/14-reference/03-connector/index.mdx
index 4fd9c452d8..54031db618 100644
--- a/docs/en/14-reference/03-connector/index.mdx
+++ b/docs/en/14-reference/03-connector/index.mdx
@@ -26,14 +26,13 @@ Using REST connection can support a broader range of operating systems as it doe
TDengine version updates often add new features, and the connector versions in the list are the best-fit versions of the connector.
-| **TDengine Versions** | **Java** | **Python** | **Go** | **C#** | **Node.js** | **Rust** |
-| --------------------- | -------- | ---------- | ------------ | ------------- | --------------- | -------- |
-| **3.0.0.0 and later** | 3.0.0 | current version | 3.0 branch | 3.0.0 | 3.0.0 | current version |
-| **2.4.0.14 and up** | 2.0.38 | current version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
-| **2.4.0.6 and up** | 2.0.37 | current version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
-| **2.4.0.4 - 2.4.0.5** | 2.0.37 | current version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
-| **2.2.x.x ** | 2.0.36 | current version | master branch | n/a | 2.0.7 - 2.0.9 | current version |
-| **2.0.x.x ** | 2.0.34 | current version | master branch | n/a | 2.0.1 - 2.0.6 | current version |
+| **TDengine Versions** | **Java** | **Python** | **Go** | **C#** | **Node.js** | **Rust** |
+| --------------------------- | -------------- | -------------- | -------------- | ------------- | --------------- | --------------- |
+| **3.0.0.0 and later** | 3.0.2 + | latest version | 3.0 branch | 3.0.0 | 3.0.0 | current version |
+| **2.4.0.14 and up ** | 2.0.38 | latest version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
+| **2.4.0.4 - 2.4.0.13 ** | 2.0.37 | latest version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
+| **2.2.x.x ** | 2.0.36 | latest version | master branch | n/a | 2.0.7 - 2.0.9 | current version |
+| **2.0.x.x ** | 2.0.34 | latest version | master branch | n/a | 2.0.1 - 2.0.6 | current version |
## Functional Features
diff --git a/docs/zh/08-connector/index.md b/docs/zh/08-connector/index.md
index e00e0b2fa2..eecf564b90 100644
--- a/docs/zh/08-connector/index.md
+++ b/docs/zh/08-connector/index.md
@@ -26,14 +26,13 @@ TDengine 提供了丰富的应用程序开发接口,为了便于用户快速
TDengine 版本更新往往会增加新的功能特性,列表中的连接器版本为连接器最佳适配版本。
-| **TDengine 版本** | **Java** | **Python** | **Go** | **C#** | **Node.js** | **Rust** |
-| --------------------- | -------- | ---------- | ------------ | ------------- | --------------- | -------- |
-| **3.0.0.0 及以上** | 3.0.0 | 当前版本 | 3.0 分支 | 3.0.0 | 3.0.0 | 当前版本 |
-| **2.4.0.14 及以上** | 2.0.38 | 当前版本 | develop 分支 | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | 当前版本 |
-| **2.4.0.6 及以上** | 2.0.37 | 当前版本 | develop 分支 | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | 当前版本 |
-| **2.4.0.4 - 2.4.0.5** | 2.0.37 | 当前版本 | develop 分支 | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | 当前版本 |
-| **2.2.x.x ** | 2.0.36 | 当前版本 | master 分支 | n/a | 2.0.7 - 2.0.9 | 当前版本 |
-| **2.0.x.x ** | 2.0.34 | 当前版本 | master 分支 | n/a | 2.0.1 - 2.0.6 | 当前版本 |
+| **TDengine 版本** | **Java** | **Python** | **Go** | **C#** | **Node.js** | **Rust** |
+| ---------------------- | --------- | ---------- | ------------ | ------------- | --------------- | -------- |
+| **3.0.0.0 及以上** | 3.0.2以上 | 当前版本 | 3.0 分支 | 3.0.0 | 3.0.0 | 当前版本 |
+| **2.4.0.14 及以上** | 2.0.38 | 当前版本 | develop 分支 | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | 当前版本 |
+| **2.4.0.4 - 2.4.0.13** | 2.0.37 | 当前版本 | develop 分支 | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | 当前版本 |
+| **2.2.x.x ** | 2.0.36 | 当前版本 | master 分支 | n/a | 2.0.7 - 2.0.9 | 当前版本 |
+| **2.0.x.x ** | 2.0.34 | 当前版本 | master 分支 | n/a | 2.0.1 - 2.0.6 | 当前版本 |
## 功能特性
diff --git a/include/common/tmsg.h b/include/common/tmsg.h
index 556c4a9a1f..02d4c2279c 100644
--- a/include/common/tmsg.h
+++ b/include/common/tmsg.h
@@ -1615,15 +1615,21 @@ typedef struct SSubQueryMsg {
uint64_t taskId;
int64_t refId;
int32_t execId;
+ int32_t msgMask;
int8_t taskType;
int8_t explain;
int8_t needFetch;
- uint32_t sqlLen; // the query sql,
- uint32_t phyLen;
- int32_t msgMask;
- char msg[];
+ uint32_t sqlLen;
+ char *sql;
+ uint32_t msgLen;
+ char *msg;
} SSubQueryMsg;
+int32_t tSerializeSSubQueryMsg(void *buf, int32_t bufLen, SSubQueryMsg *pReq);
+int32_t tDeserializeSSubQueryMsg(void *buf, int32_t bufLen, SSubQueryMsg *pReq);
+void tFreeSSubQueryMsg(SSubQueryMsg *pReq);
+
+
typedef struct {
SMsgHead header;
uint64_t sId;
@@ -1732,6 +1738,13 @@ typedef struct {
int32_t execId;
} STaskDropReq;
+int32_t tSerializeSTaskDropReq(void *buf, int32_t bufLen, STaskDropReq *pReq);
+int32_t tDeserializeSTaskDropReq(void *buf, int32_t bufLen, STaskDropReq *pReq);
+
+int32_t tSerializeSQueryTableRsp(void *buf, int32_t bufLen, SQueryTableRsp *pRsp);
+int32_t tDeserializeSQueryTableRsp(void *buf, int32_t bufLen, SQueryTableRsp *pRsp);
+
+
typedef struct {
int32_t code;
} STaskDropRsp;
diff --git a/include/libs/sync/sync.h b/include/libs/sync/sync.h
index 3a808ac6f3..513ba8cb34 100644
--- a/include/libs/sync/sync.h
+++ b/include/libs/sync/sync.h
@@ -36,7 +36,7 @@ extern "C" {
#define SYNC_DEL_WAL_MS (1000 * 60)
#define SYNC_ADD_QUORUM_COUNT 3
#define SYNC_MNODE_LOG_RETENTION 10000
-#define SYNC_VNODE_LOG_RETENTION 100
+#define SYNC_VNODE_LOG_RETENTION 20
#define SNAPSHOT_MAX_CLOCK_SKEW_MS 1000 * 10
#define SNAPSHOT_WAIT_MS 1000 * 30
diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c
index 27dcbd5be3..f2d8b9aa7c 100644
--- a/source/common/src/tglobal.c
+++ b/source/common/src/tglobal.c
@@ -277,7 +277,9 @@ static int32_t taosAddServerLogCfg(SConfig *pCfg) {
static int32_t taosAddClientCfg(SConfig *pCfg) {
char defaultFqdn[TSDB_FQDN_LEN] = {0};
int32_t defaultServerPort = 6030;
- if (taosGetFqdn(defaultFqdn) != 0) return -1;
+ if (taosGetFqdn(defaultFqdn) != 0) {
+ strcpy(defaultFqdn, "localhost");
+ }
if (cfgAddString(pCfg, "firstEp", "", 1) != 0) return -1;
if (cfgAddString(pCfg, "secondEp", "", 1) != 0) return -1;
diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c
index 52d9c5b199..35900638dd 100644
--- a/source/common/src/tmsg.c
+++ b/source/common/src/tmsg.c
@@ -4643,6 +4643,178 @@ int32_t tDeserializeSMqHbReq(void *buf, int32_t bufLen, SMqHbReq *pReq) {
return 0;
}
+int32_t tSerializeSSubQueryMsg(void *buf, int32_t bufLen, SSubQueryMsg *pReq) {
+ int32_t headLen = sizeof(SMsgHead);
+ if (buf != NULL) {
+ buf = (char *)buf + headLen;
+ bufLen -= headLen;
+ }
+
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+ if (tStartEncode(&encoder) < 0) return -1;
+
+ if (tEncodeU64(&encoder, pReq->sId) < 0) return -1;
+ if (tEncodeU64(&encoder, pReq->queryId) < 0) return -1;
+ if (tEncodeU64(&encoder, pReq->taskId) < 0) return -1;
+ if (tEncodeI64(&encoder, pReq->refId) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->execId) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->msgMask) < 0) return -1;
+ if (tEncodeI8(&encoder, pReq->taskType) < 0) return -1;
+ if (tEncodeI8(&encoder, pReq->explain) < 0) return -1;
+ if (tEncodeI8(&encoder, pReq->needFetch) < 0) return -1;
+ if (tEncodeU32(&encoder, pReq->sqlLen) < 0) return -1;
+ if (tEncodeCStrWithLen(&encoder, pReq->sql, pReq->sqlLen) < 0) return -1;
+ if (tEncodeU32(&encoder, pReq->msgLen) < 0) return -1;
+ if (tEncodeBinary(&encoder, (uint8_t*)pReq->msg, pReq->msgLen) < 0) return -1;
+
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+
+ if (buf != NULL) {
+ SMsgHead *pHead = (SMsgHead *)((char *)buf - headLen);
+ pHead->vgId = htonl(pReq->header.vgId);
+ pHead->contLen = htonl(tlen + headLen);
+ }
+
+ return tlen + headLen;
+}
+
+int32_t tDeserializeSSubQueryMsg(void *buf, int32_t bufLen, SSubQueryMsg *pReq) {
+ int32_t headLen = sizeof(SMsgHead);
+
+ SMsgHead *pHead = buf;
+ pHead->vgId = pReq->header.vgId;
+ pHead->contLen = pReq->header.contLen;
+
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, (char *)buf + headLen, bufLen - headLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+
+ if (tDecodeU64(&decoder, &pReq->sId) < 0) return -1;
+ if (tDecodeU64(&decoder, &pReq->queryId) < 0) return -1;
+ if (tDecodeU64(&decoder, &pReq->taskId) < 0) return -1;
+ if (tDecodeI64(&decoder, &pReq->refId) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->execId) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->msgMask) < 0) return -1;
+ if (tDecodeI8(&decoder, &pReq->taskType) < 0) return -1;
+ if (tDecodeI8(&decoder, &pReq->explain) < 0) return -1;
+ if (tDecodeI8(&decoder, &pReq->needFetch) < 0) return -1;
+ if (tDecodeU32(&decoder, &pReq->sqlLen) < 0) return -1;
+ if (tDecodeCStrAlloc(&decoder, &pReq->sql) < 0) return -1;
+ if (tDecodeU32(&decoder, &pReq->msgLen) < 0) return -1;
+ if (tDecodeBinaryAlloc(&decoder, (void**)&pReq->msg, NULL) < 0) return -1;
+
+ tEndDecode(&decoder);
+
+ tDecoderClear(&decoder);
+ return 0;
+}
+
+void tFreeSSubQueryMsg(SSubQueryMsg *pReq) {
+ if (NULL == pReq) {
+ return;
+ }
+
+ taosMemoryFreeClear(pReq->sql);
+ taosMemoryFreeClear(pReq->msg);
+}
+
+int32_t tSerializeSTaskDropReq(void *buf, int32_t bufLen, STaskDropReq *pReq) {
+ int32_t headLen = sizeof(SMsgHead);
+ if (buf != NULL) {
+ buf = (char *)buf + headLen;
+ bufLen -= headLen;
+ }
+
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+ if (tStartEncode(&encoder) < 0) return -1;
+
+ if (tEncodeU64(&encoder, pReq->sId) < 0) return -1;
+ if (tEncodeU64(&encoder, pReq->queryId) < 0) return -1;
+ if (tEncodeU64(&encoder, pReq->taskId) < 0) return -1;
+ if (tEncodeI64(&encoder, pReq->refId) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->execId) < 0) return -1;
+
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+
+ if (buf != NULL) {
+ SMsgHead *pHead = (SMsgHead *)((char *)buf - headLen);
+ pHead->vgId = htonl(pReq->header.vgId);
+ pHead->contLen = htonl(tlen + headLen);
+ }
+
+ return tlen + headLen;
+}
+
+int32_t tDeserializeSTaskDropReq(void *buf, int32_t bufLen, STaskDropReq *pReq) {
+ int32_t headLen = sizeof(SMsgHead);
+
+ SMsgHead *pHead = buf;
+ pHead->vgId = pReq->header.vgId;
+ pHead->contLen = pReq->header.contLen;
+
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, (char *)buf + headLen, bufLen - headLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+
+ if (tDecodeU64(&decoder, &pReq->sId) < 0) return -1;
+ if (tDecodeU64(&decoder, &pReq->queryId) < 0) return -1;
+ if (tDecodeU64(&decoder, &pReq->taskId) < 0) return -1;
+ if (tDecodeI64(&decoder, &pReq->refId) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->execId) < 0) return -1;
+
+ tEndDecode(&decoder);
+
+ tDecoderClear(&decoder);
+ return 0;
+}
+
+int32_t tSerializeSQueryTableRsp(void *buf, int32_t bufLen, SQueryTableRsp *pRsp) {
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+ if (tStartEncode(&encoder) < 0) return -1;
+
+ if (tEncodeI32(&encoder, pRsp->code) < 0) return -1;
+ if (tEncodeCStr(&encoder, pRsp->tbFName) < 0) return -1;
+ if (tEncodeI32(&encoder, pRsp->sversion) < 0) return -1;
+ if (tEncodeI32(&encoder, pRsp->tversion) < 0) return -1;
+ if (tEncodeI64(&encoder, pRsp->affectedRows) < 0) return -1;
+
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+
+ return tlen;
+}
+
+int32_t tDeserializeSQueryTableRsp(void *buf, int32_t bufLen, SQueryTableRsp *pRsp) {
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, (char *)buf, bufLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+
+ if (tDecodeI32(&decoder, &pRsp->code) < 0) return -1;
+ if (tDecodeCStrTo(&decoder, pRsp->tbFName) < 0) return -1;
+ if (tDecodeI32(&decoder, &pRsp->sversion) < 0) return -1;
+ if (tDecodeI32(&decoder, &pRsp->tversion) < 0) return -1;
+ if (tDecodeI64(&decoder, &pRsp->affectedRows) < 0) return -1;
+
+ tEndDecode(&decoder);
+
+ tDecoderClear(&decoder);
+ return 0;
+}
+
int32_t tSerializeSSchedulerHbReq(void *buf, int32_t bufLen, SSchedulerHbReq *pReq) {
int32_t headLen = sizeof(SMsgHead);
diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h
index 370103c222..27084700b0 100644
--- a/source/dnode/vnode/inc/vnode.h
+++ b/source/dnode/vnode/inc/vnode.h
@@ -239,6 +239,7 @@ int32_t tqReaderSetDataMsg(STqReader *pReader, const SSubmitReq *pMsg, int64_t v
bool tqNextDataBlock(STqReader *pReader);
bool tqNextDataBlockFilterOut(STqReader *pReader, SHashObj *filterOutUids);
int32_t tqRetrieveDataBlock(SSDataBlock *pBlock, STqReader *pReader);
+int32_t tqRetrieveTaosxBlock(STqReader *pReader, SArray *blocks, SArray *schemas);
int32_t vnodeEnqueueStreamMsg(SVnode *pVnode, SRpcMsg *pMsg);
diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c
index 092128fe6e..5e35e34b87 100644
--- a/source/dnode/vnode/src/tq/tq.c
+++ b/source/dnode/vnode/src/tq/tq.c
@@ -671,7 +671,6 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
SSubmitReq* pCont = (SSubmitReq*)&pHead->body;
if (tqTaosxScanLog(pTq, pHandle, pCont, &taosxRsp) < 0) {
- /*ASSERT(0);*/
}
if (taosxRsp.blockNum > 0 /* threshold */) {
tqOffsetResetToLog(&taosxRsp.rspOffset, fetchVer);
diff --git a/source/dnode/vnode/src/tq/tqExec.c b/source/dnode/vnode/src/tq/tqExec.c
index 48c14bc758..3887f72740 100644
--- a/source/dnode/vnode/src/tq/tqExec.c
+++ b/source/dnode/vnode/src/tq/tqExec.c
@@ -44,7 +44,7 @@ static int32_t tqAddBlockSchemaToRsp(const STqExecHandle* pExec, SMqDataRsp* pRs
return 0;
}
-static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, SMqDataRsp* pRsp) {
+static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, SMqDataRsp* pRsp, int32_t n) {
SMetaReader mr = {0};
metaReaderInit(&mr, pTq->pVnode->pMeta, 0);
// TODO add reference to gurantee success
@@ -52,8 +52,10 @@ static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, SMqDataRsp* pRsp) {
metaReaderClear(&mr);
return -1;
}
- char* tbName = strdup(mr.me.name);
- taosArrayPush(pRsp->blockTbName, &tbName);
+ for (int32_t i = 0; i < n; i++) {
+ char* tbName = strdup(mr.me.name);
+ taosArrayPush(pRsp->blockTbName, &tbName);
+ }
metaReaderClear(&mr);
return 0;
}
@@ -111,7 +113,7 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs
if (pRsp->withTbName) {
if (pRsp->rspOffset.type == TMQ_OFFSET__LOG) {
int64_t uid = pExec->pExecReader->msgIter.uid;
- tqAddTbNameToRsp(pTq, uid, pRsp);
+ tqAddTbNameToRsp(pTq, uid, pRsp, 1);
} else {
pRsp->withTbName = false;
}
@@ -155,7 +157,7 @@ int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMeta
int64_t uid = 0;
if (pOffset->type == TMQ_OFFSET__LOG) {
uid = pExec->pExecReader->msgIter.uid;
- if (tqAddTbNameToRsp(pTq, uid, (SMqDataRsp*)pRsp) < 0) {
+ if (tqAddTbNameToRsp(pTq, uid, (SMqDataRsp*)pRsp, 1) < 0) {
continue;
}
} else {
@@ -225,18 +227,30 @@ int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp
STqExecHandle* pExec = &pHandle->execHandle;
ASSERT(pExec->subType != TOPIC_SUB_TYPE__COLUMN);
+ SArray* pBlocks = taosArrayInit(0, sizeof(SSDataBlock));
+ SArray* pSchemas = taosArrayInit(0, sizeof(void*));
+
if (pExec->subType == TOPIC_SUB_TYPE__TABLE) {
STqReader* pReader = pExec->pExecReader;
tqReaderSetDataMsg(pReader, pReq, 0);
while (tqNextDataBlock(pReader)) {
- SSDataBlock block = {0};
- if (tqRetrieveDataBlock(&block, pReader) < 0) {
+ /*SSDataBlock block = {0};*/
+ /*if (tqRetrieveDataBlock(&block, pReader) < 0) {*/
+ /*if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue;*/
+ /*}*/
+
+ taosArrayClear(pBlocks);
+ taosArrayClear(pSchemas);
+ if (tqRetrieveTaosxBlock(pReader, pBlocks, pSchemas) < 0) {
if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue;
}
if (pRsp->withTbName) {
int64_t uid = pExec->pExecReader->msgIter.uid;
- if (tqAddTbNameToRsp(pTq, uid, (SMqDataRsp*)pRsp) < 0) {
- blockDataFreeRes(&block);
+ if (tqAddTbNameToRsp(pTq, uid, (SMqDataRsp*)pRsp, taosArrayGetSize(pBlocks)) < 0) {
+ taosArrayDestroyEx(pBlocks, (FDelete)blockDataFreeRes);
+ taosArrayDestroyP(pSchemas, (FDelete)tDeleteSSchemaWrapper);
+ pBlocks = taosArrayInit(0, sizeof(SSDataBlock));
+ pSchemas = taosArrayInit(0, sizeof(void*));
continue;
}
}
@@ -255,25 +269,37 @@ int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp
pRsp->createTableNum++;
}
}
- tqAddBlockDataToRsp(&block, (SMqDataRsp*)pRsp, taosArrayGetSize(block.pDataBlock),
- pTq->pVnode->config.tsdbCfg.precision);
- blockDataFreeRes(&block);
- tqAddBlockSchemaToRsp(pExec, (SMqDataRsp*)pRsp);
- pRsp->blockNum++;
+ for (int32_t i = 0; i < taosArrayGetSize(pBlocks); i++) {
+ SSDataBlock* pBlock = taosArrayGet(pBlocks, i);
+ tqAddBlockDataToRsp(pBlock, (SMqDataRsp*)pRsp, taosArrayGetSize(pBlock->pDataBlock),
+ pTq->pVnode->config.tsdbCfg.precision);
+ blockDataFreeRes(pBlock);
+ SSchemaWrapper* pSW = taosArrayGetP(pSchemas, i);
+ taosArrayPush(pRsp->blockSchema, &pSW);
+ pRsp->blockNum++;
+ }
}
} else if (pExec->subType == TOPIC_SUB_TYPE__DB) {
STqReader* pReader = pExec->pExecReader;
tqReaderSetDataMsg(pReader, pReq, 0);
while (tqNextDataBlockFilterOut(pReader, pExec->execDb.pFilterOutTbUid)) {
- SSDataBlock block = {0};
- if (tqRetrieveDataBlock(&block, pReader) < 0) {
+ /*SSDataBlock block = {0};*/
+ /*if (tqRetrieveDataBlock(&block, pReader) < 0) {*/
+ /*if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue;*/
+ /*}*/
+ taosArrayClear(pBlocks);
+ taosArrayClear(pSchemas);
+ if (tqRetrieveTaosxBlock(pReader, pBlocks, pSchemas) < 0) {
if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue;
}
if (pRsp->withTbName) {
int64_t uid = pExec->pExecReader->msgIter.uid;
- if (tqAddTbNameToRsp(pTq, uid, (SMqDataRsp*)pRsp) < 0) {
- blockDataFreeRes(&block);
- continue;
+ if (tqAddTbNameToRsp(pTq, uid, (SMqDataRsp*)pRsp, taosArrayGetSize(pBlocks)) < 0) {
+ taosArrayDestroyEx(pBlocks, (FDelete)blockDataFreeRes);
+ taosArrayDestroyP(pSchemas, (FDelete)tDeleteSSchemaWrapper);
+ pBlocks = taosArrayInit(0, sizeof(SSDataBlock));
+ pSchemas = taosArrayInit(0, sizeof(void*));
+ return -1;
}
}
if (pHandle->fetchMeta) {
@@ -291,14 +317,26 @@ int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp
pRsp->createTableNum++;
}
}
- tqAddBlockDataToRsp(&block, (SMqDataRsp*)pRsp, taosArrayGetSize(block.pDataBlock),
- pTq->pVnode->config.tsdbCfg.precision);
- blockDataFreeRes(&block);
- tqAddBlockSchemaToRsp(pExec, (SMqDataRsp*)pRsp);
- pRsp->blockNum++;
+ /*tqAddBlockDataToRsp(&block, (SMqDataRsp*)pRsp, taosArrayGetSize(block.pDataBlock),*/
+ /*pTq->pVnode->config.tsdbCfg.precision);*/
+ /*blockDataFreeRes(&block);*/
+ /*tqAddBlockSchemaToRsp(pExec, (SMqDataRsp*)pRsp);*/
+ /*pRsp->blockNum++;*/
+ for (int32_t i = 0; i < taosArrayGetSize(pBlocks); i++) {
+ SSDataBlock* pBlock = taosArrayGet(pBlocks, i);
+ tqAddBlockDataToRsp(pBlock, (SMqDataRsp*)pRsp, taosArrayGetSize(pBlock->pDataBlock),
+ pTq->pVnode->config.tsdbCfg.precision);
+ blockDataFreeRes(pBlock);
+ SSchemaWrapper* pSW = taosArrayGetP(pSchemas, i);
+ taosArrayPush(pRsp->blockSchema, &pSW);
+ pRsp->blockNum++;
+ }
}
}
+ taosArrayDestroy(pBlocks);
+ taosArrayDestroy(pSchemas);
+
if (pRsp->blockNum == 0) {
return -1;
}
diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c
index 5c5ba1205e..afb7ac39de 100644
--- a/source/dnode/vnode/src/tq/tqRead.c
+++ b/source/dnode/vnode/src/tq/tqRead.c
@@ -556,7 +556,7 @@ FAIL:
return -1;
}
-int32_t tqSplitRetrieveDataBlock(STqReader* pReader, SArray* blocks, SArray* schemas) {
+int32_t tqRetrieveTaosxBlock(STqReader* pReader, SArray* blocks, SArray* schemas) {
int32_t sversion = htonl(pReader->pBlock->sversion);
if (pReader->cachedSchemaSuid == 0 || pReader->cachedSchemaVer != sversion ||
@@ -592,9 +592,10 @@ int32_t tqSplitRetrieveDataBlock(STqReader* pReader, SArray* blocks, SArray* sch
int32_t colAtMost = pSchemaWrapper->nCols;
int32_t curRow = 0;
+ int32_t lastRow = 0;
char* assigned = taosMemoryCalloc(1, pSchemaWrapper->nCols);
- if (assigned) return -1;
+ if (assigned == NULL) return -1;
tInitSubmitBlkIter(&pReader->msgIter, pReader->pBlock, &pReader->blkIter);
STSRowIter iter = {0};
@@ -605,11 +606,13 @@ int32_t tqSplitRetrieveDataBlock(STqReader* pReader, SArray* blocks, SArray* sch
bool buildNew = false;
tdSTSRowIterReset(&iter, row);
+ tqDebug("vgId:%d, row of block %d", pReader->pWalReader->pWal->cfg.vgId, curRow);
for (int32_t i = 0; i < colAtMost; i++) {
SCellVal sVal = {0};
if (!tdSTSRowIterFetch(&iter, pSchemaWrapper->pSchema[i].colId, pSchemaWrapper->pSchema[i].type, &sVal)) {
break;
}
+ tqDebug("vgId:%d, %d col, type %d", pReader->pWalReader->pWal->cfg.vgId, i, sVal.valType);
if (curRow == 0) {
assigned[i] = sVal.valType != TD_VTYPE_NONE;
buildNew = true;
@@ -623,27 +626,42 @@ int32_t tqSplitRetrieveDataBlock(STqReader* pReader, SArray* blocks, SArray* sch
}
if (buildNew) {
- SSDataBlock block;
- SSchemaWrapper sw;
- if (tqMaskBlock(&sw, &block, pSchemaWrapper, assigned) < 0) {
+ if (taosArrayGetSize(blocks) > 0) {
+ SSDataBlock* pLastBlock = taosArrayGetLast(blocks);
+ pLastBlock->info.rows = curRow - lastRow;
+ lastRow = curRow;
+ }
+ SSDataBlock* pBlock = createDataBlock();
+ SSchemaWrapper* pSW = taosMemoryCalloc(1, sizeof(SSchemaWrapper));
+ if (tqMaskBlock(pSW, pBlock, pSchemaWrapper, assigned) < 0) {
+ blockDataDestroy(pBlock);
goto FAIL;
}
+ SSDataBlock block = {0};
+ assignOneDataBlock(&block, pBlock);
+ blockDataDestroy(pBlock);
+
+ tqDebug("vgId:%d, build new block, col %d", pReader->pWalReader->pWal->cfg.vgId,
+ (int32_t)taosArrayGetSize(block.pDataBlock));
taosArrayPush(blocks, &block);
- taosArrayPush(schemas, &sw);
+ taosArrayPush(schemas, &pSW);
}
SSDataBlock* pBlock = taosArrayGetLast(blocks);
pBlock->info.uid = pReader->msgIter.uid;
- pBlock->info.rows = pReader->msgIter.numOfRows;
+ pBlock->info.rows = 0;
pBlock->info.version = pReader->pMsg->version;
+ tqDebug("vgId:%d, taosx scan, block num: %d", pReader->pWalReader->pWal->cfg.vgId,
+ (int32_t)taosArrayGetSize(blocks));
+
if (blockDataEnsureCapacity(pBlock, pReader->msgIter.numOfRows - curRow) < 0) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
goto FAIL;
}
- tdSTSRowIterInit(&iter, pTschema);
+ tdSTSRowIterReset(&iter, row);
for (int32_t i = 0; i < taosArrayGetSize(pBlock->pDataBlock); i++) {
SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, i);
SCellVal sVal = {0};
@@ -654,12 +672,16 @@ int32_t tqSplitRetrieveDataBlock(STqReader* pReader, SArray* blocks, SArray* sch
ASSERT(sVal.valType != TD_VTYPE_NONE);
- if (colDataAppend(pColData, curRow, sVal.val, sVal.valType != TD_VTYPE_NORM) < 0) {
+ if (colDataAppend(pColData, curRow, sVal.val, sVal.valType == TD_VTYPE_NULL) < 0) {
goto FAIL;
}
+ tqDebug("vgId:%d, row %d col %d append %d", pReader->pWalReader->pWal->cfg.vgId, curRow, i,
+ sVal.valType == TD_VTYPE_NULL);
}
curRow++;
}
+ SSDataBlock* pLastBlock = taosArrayGetLast(blocks);
+ pLastBlock->info.rows = curRow - lastRow;
taosMemoryFree(assigned);
return 0;
diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c
index b2624d1bc1..27bfea0534 100644
--- a/source/dnode/vnode/src/tq/tqSink.c
+++ b/source/dnode/vnode/src/tq/tqSink.c
@@ -349,7 +349,6 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
.contLen = len + sizeof(SMsgHead),
};
if (tmsgPutToQueue(&pVnode->msgCb, WRITE_QUEUE, &msg) != 0) {
- rpcFreeCont(serializedDeleteReq);
tqDebug("failed to put delete req into write-queue since %s", terrstr());
}
} else {
@@ -476,12 +475,12 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
cap += sizeof(SSubmitBlk) + schemaLen + rows * maxLen;
- SSubmitReq* ret = rpcMallocCont(cap);
- ret->header.vgId = pVnode->config.vgId;
- ret->length = sizeof(SSubmitReq);
- ret->numOfBlocks = htonl(1);
+ SSubmitReq* pSubmit = rpcMallocCont(cap);
+ pSubmit->header.vgId = pVnode->config.vgId;
+ pSubmit->length = sizeof(SSubmitReq);
+ pSubmit->numOfBlocks = htonl(1);
- SSubmitBlk* blkHead = POINTER_SHIFT(ret, sizeof(SSubmitReq));
+ SSubmitBlk* blkHead = POINTER_SHIFT(pSubmit, sizeof(SSubmitReq));
blkHead->numOfRows = htonl(pDataBlock->info.rows);
blkHead->sversion = htonl(pTSchema->version);
@@ -531,17 +530,16 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
}
blkHead->dataLen = htonl(dataLen);
- ret->length += sizeof(SSubmitBlk) + schemaLen + dataLen;
- ret->length = htonl(ret->length);
+ pSubmit->length += sizeof(SSubmitBlk) + schemaLen + dataLen;
+ pSubmit->length = htonl(pSubmit->length);
SRpcMsg msg = {
.msgType = TDMT_VND_SUBMIT,
- .pCont = ret,
- .contLen = ntohl(ret->length),
+ .pCont = pSubmit,
+ .contLen = ntohl(pSubmit->length),
};
if (tmsgPutToQueue(&pVnode->msgCb, WRITE_QUEUE, &msg) != 0) {
- rpcFreeCont(ret);
tqDebug("failed to put into write-queue since %s", terrstr());
}
}
diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c
index 986cba8b17..ca3db1e5d8 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRead.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRead.c
@@ -329,20 +329,6 @@ static SHashObj* createDataBlockScanInfo(STsdbReader* pTsdbReader, const STableK
}
taosHashPut(pTableMap, &pScanInfo->uid, sizeof(uint64_t), &pScanInfo, POINTER_BYTES);
-
-#if 0
-// STableBlockScanInfo info = {.lastKey = 0, .uid = idList[j].uid};
- if (ASCENDING_TRAVERSE(pTsdbReader->order)) {
- int64_t skey = pTsdbReader->window.skey;
- info.lastKey = (skey > INT64_MIN) ? (skey - 1) : skey;
- } else {
- int64_t ekey = pTsdbReader->window.ekey;
- info.lastKey = (ekey < INT64_MAX) ? (ekey + 1) : ekey;
- }
-
- taosHashPut(pTableMap, &info.uid, sizeof(uint64_t), &info, sizeof(info));
-#endif
-
tsdbTrace("%p check table uid:%" PRId64 " from lastKey:%" PRId64 " %s", pTsdbReader, pScanInfo->uid,
pScanInfo->lastKey, pTsdbReader->idStr);
}
@@ -361,11 +347,17 @@ static void resetAllDataBlockScanInfo(SHashObj* pTableMap, int64_t ts) {
STableBlockScanInfo* pInfo = *(STableBlockScanInfo**)p;
pInfo->iterInit = false;
+ pInfo->iter.hasVal = false;
pInfo->iiter.hasVal = false;
+
if (pInfo->iter.iter != NULL) {
pInfo->iter.iter = tsdbTbDataIterDestroy(pInfo->iter.iter);
}
+ if (pInfo->iiter.iter != NULL) {
+ pInfo->iiter.iter = tsdbTbDataIterDestroy(pInfo->iiter.iter);
+ }
+
pInfo->delSkyline = taosArrayDestroy(pInfo->delSkyline);
pInfo->lastKey = ts;
}
@@ -373,6 +365,8 @@ static void resetAllDataBlockScanInfo(SHashObj* pTableMap, int64_t ts) {
static void clearBlockScanInfo(STableBlockScanInfo* p) {
p->iterInit = false;
+
+ p->iter.hasVal = false;
p->iiter.hasVal = false;
if (p->iter.iter != NULL) {
@@ -388,9 +382,9 @@ static void clearBlockScanInfo(STableBlockScanInfo* p) {
tMapDataClear(&p->mapData);
}
-static void destroyAllBlockScanInfo(SHashObj* pTableMap, bool clearEntry) {
+static void destroyAllBlockScanInfo(SHashObj* pTableMap) {
void* p = NULL;
- while (clearEntry && ((p = taosHashIterate(pTableMap, p)) != NULL)) {
+ while ((p = taosHashIterate(pTableMap, p)) != NULL) {
clearBlockScanInfo(*(STableBlockScanInfo**)p);
}
@@ -2226,6 +2220,7 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea
if (pReader->pReadSnap->pMem != NULL) {
d = tsdbGetTbDataFromMemTable(pReader->pReadSnap->pMem, pReader->suid, pBlockScanInfo->uid);
if (d != NULL) {
+ ASSERT(pBlockScanInfo->iter.iter == NULL);
code = tsdbTbDataIterCreate(d, &startKey, backward, &pBlockScanInfo->iter.iter);
if (code == TSDB_CODE_SUCCESS) {
pBlockScanInfo->iter.hasVal = (tsdbTbDataIterGet(pBlockScanInfo->iter.iter) != NULL);
@@ -3789,8 +3784,7 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, void* pTableL
updateBlockSMAInfo(pReader->pSchema, &pReader->suppInfo);
}
- STsdbReader* p = pReader->innerReader[0] != NULL ? pReader->innerReader[0] : pReader;
-
+ STsdbReader* p = (pReader->innerReader[0] != NULL)? pReader->innerReader[0]:pReader;
pReader->status.pTableMap = createDataBlockScanInfo(p, pTableList, numOfTables);
if (pReader->status.pTableMap == NULL) {
tsdbReaderClose(pReader);
@@ -3849,7 +3843,7 @@ void tsdbReaderClose(STsdbReader* pReader) {
}
{
- if (pReader->innerReader[0] != NULL) {
+ if (pReader->innerReader[0] != NULL || pReader->innerReader[1] != NULL) {
STsdbReader* p = pReader->innerReader[0];
p->status.pTableMap = NULL;
@@ -3887,9 +3881,12 @@ void tsdbReaderClose(STsdbReader* pReader) {
cleanupDataBlockIterator(&pReader->status.blockIter);
size_t numOfTables = taosHashGetSize(pReader->status.pTableMap);
- destroyAllBlockScanInfo(pReader->status.pTableMap, (pReader->innerReader[0] == NULL) ? true : false);
+ if (pReader->status.pTableMap != NULL) {
+ destroyAllBlockScanInfo(pReader->status.pTableMap);
+ clearBlockScanInfoBuf(&pReader->blockInfoBuf);
+ }
+
blockDataDestroy(pReader->pResBlock);
- clearBlockScanInfoBuf(&pReader->blockInfoBuf);
if (pReader->pFileReader != NULL) {
tsdbDataFReaderClose(&pReader->pFileReader);
@@ -4118,9 +4115,13 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SColumnDataAgg*** pBlockS
} else if (pAgg->colId < pSup->colIds[j]) {
i += 1;
} else if (pSup->colIds[j] < pAgg->colId) {
+ if (pSup->colIds[j] == PRIMARYKEY_TIMESTAMP_COL_ID) {
+ taosArrayPush(pNewAggList, &pSup->tsColAgg);
+ } else {
// all date in this block are null
- SColumnDataAgg nullColAgg = {.colId = pSup->colIds[j], .numOfNull = pBlock->nRow};
- taosArrayPush(pNewAggList, &nullColAgg);
+ SColumnDataAgg nullColAgg = {.colId = pSup->colIds[j], .numOfNull = pBlock->nRow};
+ taosArrayPush(pNewAggList, &nullColAgg);
+ }
j += 1;
}
}
diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c
index 5c8c166833..c75d1ffded 100644
--- a/source/dnode/vnode/src/vnd/vnodeSvr.c
+++ b/source/dnode/vnode/src/vnd/vnodeSvr.c
@@ -609,6 +609,7 @@ static int32_t vnodeProcessCreateTbReq(SVnode *pVnode, int64_t version, void *pR
_exit:
for (int32_t iReq = 0; iReq < req.nReqs; iReq++) {
pCreateReq = req.pReqs + iReq;
+ taosMemoryFree(pCreateReq->comment);
taosArrayDestroy(pCreateReq->ctb.tagName);
}
taosArrayDestroyEx(rsp.pArray, tFreeSVCreateTbRsp);
diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h
index 9b9a1ef259..f179c7bd41 100644
--- a/source/libs/executor/inc/executorimpl.h
+++ b/source/libs/executor/inc/executorimpl.h
@@ -239,6 +239,7 @@ typedef struct SSourceDataInfo {
int32_t index;
SRetrieveTableRsp* pRsp;
uint64_t totalRows;
+ int64_t startTime;
int32_t code;
EX_SOURCE_STATUS status;
const char* taskId;
diff --git a/source/libs/executor/src/cachescanoperator.c b/source/libs/executor/src/cachescanoperator.c
index b78ba8ac0a..922ed05653 100644
--- a/source/libs/executor/src/cachescanoperator.c
+++ b/source/libs/executor/src/cachescanoperator.c
@@ -246,6 +246,7 @@ void destroyLastrowScanOperator(void* param) {
pInfo->pLastrowReader = tsdbCacherowsReaderClose(pInfo->pLastrowReader);
}
+ cleanupExprSupp(&pInfo->pseudoExprSup);
taosMemoryFreeClear(param);
}
diff --git a/source/libs/executor/src/exchangeoperator.c b/source/libs/executor/src/exchangeoperator.c
index c57a1b38eb..a28066003a 100644
--- a/source/libs/executor/src/exchangeoperator.c
+++ b/source/libs/executor/src/exchangeoperator.c
@@ -44,7 +44,7 @@ typedef struct SFetchRspHandleWrapper {
static void destroyExchangeOperatorInfo(void* param);
static void freeBlock(void* pParam);
static void freeSourceDataInfo(void* param);
-static void* setAllSourcesCompleted(SOperatorInfo* pOperator, int64_t startTs);
+static void* setAllSourcesCompleted(SOperatorInfo* pOperator);
static int32_t loadRemoteDataCallback(void* param, SDataBuf* pMsg, int32_t code);
static int32_t doSendFetchDataRequest(SExchangeInfo* pExchangeInfo, SExecTaskInfo* pTaskInfo, int32_t sourceIndex);
@@ -59,7 +59,7 @@ static void concurrentlyLoadRemoteDataImpl(SOperatorInfo* pOperator, SExchangeIn
size_t totalSources = taosArrayGetSize(pExchangeInfo->pSourceDataInfo);
int32_t completed = getCompletedSources(pExchangeInfo->pSourceDataInfo);
if (completed == totalSources) {
- setAllSourcesCompleted(pOperator, pExchangeInfo->openedTs);
+ setAllSourcesCompleted(pOperator);
return;
}
@@ -113,7 +113,8 @@ static void concurrentlyLoadRemoteDataImpl(SOperatorInfo* pOperator, SExchangeIn
taosArrayPush(pExchangeInfo->pResultBlockList, &pb);
}
- updateLoadRemoteInfo(pLoadInfo, pRetrieveRsp->numOfRows, pRetrieveRsp->compLen, pExchangeInfo->openedTs, pOperator);
+ updateLoadRemoteInfo(pLoadInfo, pRetrieveRsp->numOfRows, pRetrieveRsp->compLen, pDataInfo->startTime, pOperator);
+ pDataInfo->totalRows += pRetrieveRsp->numOfRows;
if (pRsp->completed == 1) {
pDataInfo->status = EX_SOURCE_DATA_EXHAUSTED;
@@ -388,6 +389,7 @@ int32_t doSendFetchDataRequest(SExchangeInfo* pExchangeInfo, SExecTaskInfo* pTas
SDownstreamSourceNode* pSource = taosArrayGet(pExchangeInfo->pSources, sourceIndex);
SSourceDataInfo* pDataInfo = taosArrayGet(pExchangeInfo->pSourceDataInfo, sourceIndex);
+ pDataInfo->startTime = taosGetTimestampUs();
ASSERT(pDataInfo->status == EX_SOURCE_DATA_NOT_READY);
@@ -493,18 +495,14 @@ int32_t extractDataBlockFromFetchRsp(SSDataBlock* pRes, char* pData, SArray* pCo
return TSDB_CODE_SUCCESS;
}
-void* setAllSourcesCompleted(SOperatorInfo* pOperator, int64_t startTs) {
+void* setAllSourcesCompleted(SOperatorInfo* pOperator) {
SExchangeInfo* pExchangeInfo = pOperator->info;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
- int64_t el = taosGetTimestampUs() - startTs;
SLoadRemoteDataInfo* pLoadInfo = &pExchangeInfo->loadInfo;
-
- pLoadInfo->totalElapsed += el;
-
size_t totalSources = taosArrayGetSize(pExchangeInfo->pSources);
- qDebug("%s all %" PRIzu " sources are exhausted, total rows: %" PRIu64 " bytes:%" PRIu64 ", elapsed:%.2f ms",
- GET_TASKID(pTaskInfo), totalSources, pLoadInfo->totalRows, pLoadInfo->totalSize,
+ qDebug("%s all %" PRIzu " sources are exhausted, total rows: %" PRIu64 ", %.2f Kb, elapsed:%.2f ms",
+ GET_TASKID(pTaskInfo), totalSources, pLoadInfo->totalRows, pLoadInfo->totalSize / 1024.0,
pLoadInfo->totalElapsed / 1000.0);
setOperatorCompleted(pOperator);
@@ -566,7 +564,7 @@ int32_t seqLoadRemoteData(SOperatorInfo* pOperator) {
while (1) {
if (pExchangeInfo->current >= totalSources) {
- setAllSourcesCompleted(pOperator, startTs);
+ setAllSourcesCompleted(pOperator);
return TSDB_CODE_SUCCESS;
}
diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c
index 0dd5765aa4..a7e955100c 100644
--- a/source/libs/executor/src/executorimpl.c
+++ b/source/libs/executor/src/executorimpl.c
@@ -20,7 +20,6 @@
#include "querynodes.h"
#include "tfill.h"
#include "tname.h"
-#include "tref.h"
#include "tdatablock.h"
#include "tglobal.h"
@@ -134,45 +133,6 @@ static int32_t doCopyToSDataBlock(SExecTaskInfo* pTaskInfo, SSDataBlock* pBlock,
static void initCtxOutputBuffer(SqlFunctionCtx* pCtx, int32_t size);
static void doSetTableGroupOutputBuf(SOperatorInfo* pOperator, int32_t numOfOutput, uint64_t groupId);
-#if 0
-static bool chkResultRowFromKey(STaskRuntimeEnv* pRuntimeEnv, SResultRowInfo* pResultRowInfo, char* pData,
- int16_t bytes, bool masterscan, uint64_t uid) {
- bool existed = false;
- SET_RES_WINDOW_KEY(pRuntimeEnv->keyBuf, pData, bytes, uid);
-
- SResultRow** p1 =
- (SResultRow**)taosHashGet(pRuntimeEnv->pResultRowHashTable, pRuntimeEnv->keyBuf, GET_RES_WINDOW_KEY_LEN(bytes));
-
- // in case of repeat scan/reverse scan, no new time window added.
- if (QUERY_IS_INTERVAL_QUERY(pRuntimeEnv->pQueryAttr)) {
- if (!masterscan) { // the *p1 may be NULL in case of sliding+offset exists.
- return p1 != NULL;
- }
-
- if (p1 != NULL) {
- if (pResultRowInfo->size == 0) {
- existed = false;
- } else if (pResultRowInfo->size == 1) {
- // existed = (pResultRowInfo->pResult[0] == (*p1));
- } else { // check if current pResultRowInfo contains the existed pResultRow
- SET_RES_EXT_WINDOW_KEY(pRuntimeEnv->keyBuf, pData, bytes, uid, pResultRowInfo);
- int64_t* index =
- taosHashGet(pRuntimeEnv->pResultRowListSet, pRuntimeEnv->keyBuf, GET_RES_EXT_WINDOW_KEY_LEN(bytes));
- if (index != NULL) {
- existed = true;
- } else {
- existed = false;
- }
- }
- }
-
- return existed;
- }
-
- return p1 != NULL;
-}
-#endif
-
SResultRow* getNewResultRow(SDiskbasedBuf* pResultBuf, int32_t* currentPageId, int32_t interBufSize) {
SFilePage* pData = NULL;
diff --git a/source/libs/executor/src/sortoperator.c b/source/libs/executor/src/sortoperator.c
index add580ce7c..14e3163455 100644
--- a/source/libs/executor/src/sortoperator.c
+++ b/source/libs/executor/src/sortoperator.c
@@ -690,6 +690,8 @@ SSDataBlock* doMultiwayMerge(SOperatorInfo* pOperator) {
T_LONG_JMP(pTaskInfo->env, code);
}
+ qDebug("start to merge final sorted rows, %s", GET_TASKID(pTaskInfo));
+
SSDataBlock* pBlock = getMultiwaySortedBlockData(pInfo->pSortHandle, pInfo->binfo.pRes, pInfo->matchInfo.pList, pOperator);
if (pBlock != NULL) {
pOperator->resultInfo.totalRows += pBlock->info.rows;
@@ -754,7 +756,7 @@ SOperatorInfo* createMultiwayMergeOperatorInfo(SOperatorInfo** downStreams, size
SPhysiNode* pChildNode = (SPhysiNode*)nodesListGetNode(pPhyNode->pChildren, 0);
SSDataBlock* pInputBlock = createResDataBlock(pChildNode->pOutputDataBlockDesc);
- initResultSizeInfo(&pOperator->resultInfo, 1024);
+ initResultSizeInfo(&pOperator->resultInfo, 4096);
blockDataEnsureCapacity(pInfo->binfo.pRes, pOperator->resultInfo.capacity);
pInfo->groupSort = pMergePhyNode->groupSort;
diff --git a/source/libs/qworker/src/qwMsg.c b/source/libs/qworker/src/qwMsg.c
index 7e7f71b176..bb8a7cd140 100644
--- a/source/libs/qworker/src/qwMsg.c
+++ b/source/libs/qworker/src/qwMsg.c
@@ -65,19 +65,37 @@ int32_t qwBuildAndSendErrorRsp(int32_t rspType, SRpcHandleInfo *pConn, int32_t c
int32_t qwBuildAndSendQueryRsp(int32_t rspType, SRpcHandleInfo *pConn, int32_t code, SQWTaskCtx *ctx) {
STbVerInfo *tbInfo = ctx ? &ctx->tbInfo : NULL;
int64_t affectedRows = ctx ? ctx->affectedRows : 0;
- SQueryTableRsp *pRsp = (SQueryTableRsp *)rpcMallocCont(sizeof(SQueryTableRsp));
- pRsp->code = htonl(code);
- pRsp->affectedRows = htobe64(affectedRows);
+ SQueryTableRsp rsp = {0};
+ rsp.code = code;
+ rsp.affectedRows = affectedRows;
+
if (tbInfo) {
- strcpy(pRsp->tbFName, tbInfo->tbFName);
- pRsp->sversion = htonl(tbInfo->sversion);
- pRsp->tversion = htonl(tbInfo->tversion);
+ strcpy(rsp.tbFName, tbInfo->tbFName);
+ rsp.sversion = tbInfo->sversion;
+ rsp.tversion = tbInfo->tversion;
+ }
+
+ int32_t msgSize = tSerializeSQueryTableRsp(NULL, 0, &rsp);
+ if (msgSize < 0) {
+ qError("tSerializeSQueryTableRsp failed");
+ QW_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
+ void *pRsp = rpcMallocCont(msgSize);
+ if (NULL == pRsp) {
+ qError("rpcMallocCont %d failed", msgSize);
+ QW_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
+ if (tSerializeSQueryTableRsp(pRsp, msgSize, &rsp) < 0) {
+ qError("tSerializeSQueryTableRsp %d failed", msgSize);
+ QW_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
SRpcMsg rpcRsp = {
.msgType = rspType,
.pCont = pRsp,
- .contLen = sizeof(*pRsp),
+ .contLen = msgSize,
.code = code,
.info = *pConn,
};
@@ -182,23 +200,37 @@ int32_t qwBuildAndSendDropRsp(SRpcHandleInfo *pConn, int32_t code) {
#endif
int32_t qwBuildAndSendDropMsg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
- STaskDropReq *req = (STaskDropReq *)rpcMallocCont(sizeof(STaskDropReq));
- if (NULL == req) {
- QW_SCH_TASK_ELOG("rpcMallocCont %d failed", (int32_t)sizeof(STaskDropReq));
+ STaskDropReq qMsg;
+ qMsg.header.vgId = mgmt->nodeId;
+ qMsg.header.contLen = 0;
+ qMsg.sId = sId;
+ qMsg.queryId = qId;
+ qMsg.taskId = tId;
+ qMsg.refId = rId;
+ qMsg.execId = eId;
+
+ int32_t msgSize = tSerializeSTaskDropReq(NULL, 0, &qMsg);
+ if (msgSize < 0) {
+ QW_SCH_TASK_ELOG("tSerializeSTaskDropReq get size, msgSize:%d", msgSize);
+ QW_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
+ void *msg = rpcMallocCont(msgSize);
+ if (NULL == msg) {
+ QW_SCH_TASK_ELOG("rpcMallocCont %d failed", msgSize);
+ QW_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
+ if (tSerializeSTaskDropReq(msg, msgSize, &qMsg) < 0) {
+ QW_SCH_TASK_ELOG("tSerializeSTaskDropReq failed, msgSize:%d", msgSize);
+ rpcFreeCont(msg);
QW_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
- req->header.vgId = mgmt->nodeId;
- req->sId = sId;
- req->queryId = qId;
- req->taskId = tId;
- req->refId = rId;
- req->execId = eId;
-
SRpcMsg pNewMsg = {
.msgType = TDMT_SCH_DROP_TASK,
- .pCont = req,
- .contLen = sizeof(STaskDropReq),
+ .pCont = msg,
+ .contLen = msgSize,
.code = 0,
.info = *pConn,
};
@@ -247,22 +279,37 @@ int32_t qwBuildAndSendCQueryMsg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
}
int32_t qwRegisterQueryBrokenLinkArg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
- STaskDropReq *req = (STaskDropReq *)rpcMallocCont(sizeof(STaskDropReq));
- if (NULL == req) {
- QW_SCH_TASK_ELOG("rpcMallocCont %d failed", (int32_t)sizeof(STaskDropReq));
+ STaskDropReq qMsg;
+ qMsg.header.vgId = mgmt->nodeId;
+ qMsg.header.contLen = 0;
+ qMsg.sId = sId;
+ qMsg.queryId = qId;
+ qMsg.taskId = tId;
+ qMsg.refId = rId;
+ qMsg.execId = eId;
+
+ int32_t msgSize = tSerializeSTaskDropReq(NULL, 0, &qMsg);
+ if (msgSize < 0) {
+ QW_SCH_TASK_ELOG("tSerializeSTaskDropReq get size, msgSize:%d", msgSize);
+ QW_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
+ void *msg = rpcMallocCont(msgSize);
+ if (NULL == msg) {
+ QW_SCH_TASK_ELOG("rpcMallocCont %d failed", msgSize);
+ QW_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
+ if (tSerializeSTaskDropReq(msg, msgSize, &qMsg) < 0) {
+ QW_SCH_TASK_ELOG("tSerializeSTaskDropReq failed, msgSize:%d", msgSize);
+ rpcFreeCont(msg);
QW_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
- req->header.vgId = htonl(mgmt->nodeId);
- req->sId = htobe64(sId);
- req->queryId = htobe64(qId);
- req->taskId = htobe64(tId);
- req->refId = htobe64(rId);
-
SRpcMsg brokenMsg = {
.msgType = TDMT_SCH_DROP_TASK,
- .pCont = req,
- .contLen = sizeof(STaskDropReq),
+ .pCont = msg,
+ .contLen = msgSize,
.code = TSDB_CODE_RPC_BROKEN_LINK,
.info = *pConn,
};
@@ -312,40 +359,33 @@ int32_t qWorkerPreprocessQueryMsg(void *qWorkerMgmt, SRpcMsg *pMsg, bool chkGran
}
int32_t code = 0;
- SSubQueryMsg *msg = pMsg->pCont;
SQWorker *mgmt = (SQWorker *)qWorkerMgmt;
-
- if (NULL == msg || pMsg->contLen <= sizeof(*msg)) {
- QW_ELOG("invalid query msg, msg:%p, msgLen:%d", msg, pMsg->contLen);
+ SSubQueryMsg msg = {0};
+ if (tDeserializeSSubQueryMsg(pMsg->pCont, pMsg->contLen, &msg) < 0) {
+ QW_ELOG("tDeserializeSSubQueryMsg failed, contLen:%d", pMsg->contLen);
QW_ERR_RET(TSDB_CODE_QRY_INVALID_INPUT);
}
- msg->sId = be64toh(msg->sId);
- msg->queryId = be64toh(msg->queryId);
- msg->taskId = be64toh(msg->taskId);
- msg->refId = be64toh(msg->refId);
- msg->execId = ntohl(msg->execId);
- msg->phyLen = ntohl(msg->phyLen);
- msg->sqlLen = ntohl(msg->sqlLen);
- msg->msgMask = ntohl(msg->msgMask);
-
- if (chkGrant && (!TEST_SHOW_REWRITE_MASK(msg->msgMask)) && (grantCheck(TSDB_GRANT_TIME) != TSDB_CODE_SUCCESS)) {
- QW_ELOG("query failed cause of grant expired, msgMask:%d", msg->msgMask);
+ if (chkGrant && (!TEST_SHOW_REWRITE_MASK(msg.msgMask)) && (grantCheck(TSDB_GRANT_TIME) != TSDB_CODE_SUCCESS)) {
+ QW_ELOG("query failed cause of grant expired, msgMask:%d", msg.msgMask);
+ tFreeSSubQueryMsg(&msg);
QW_ERR_RET(TSDB_CODE_GRANT_EXPIRED);
}
- uint64_t sId = msg->sId;
- uint64_t qId = msg->queryId;
- uint64_t tId = msg->taskId;
- int64_t rId = msg->refId;
- int32_t eId = msg->execId;
+ uint64_t sId = msg.sId;
+ uint64_t qId = msg.queryId;
+ uint64_t tId = msg.taskId;
+ int64_t rId = msg.refId;
+ int32_t eId = msg.execId;
SQWMsg qwMsg = {
- .msgType = pMsg->msgType, .msg = msg->msg + msg->sqlLen, .msgLen = msg->phyLen, .connInfo = pMsg->info};
+ .msgType = pMsg->msgType, .msg = msg.msg, .msgLen = msg.msgLen, .connInfo = pMsg->info};
- QW_SCH_TASK_DLOG("prerocessQuery start, handle:%p", pMsg->info.handle);
- QW_ERR_RET(qwPreprocessQuery(QW_FPARAMS(), &qwMsg));
- QW_SCH_TASK_DLOG("prerocessQuery end, handle:%p", pMsg->info.handle);
+ QW_SCH_TASK_DLOG("prerocessQuery start, handle:%p, SQL:%s", pMsg->info.handle, msg.sql);
+ code = qwPreprocessQuery(QW_FPARAMS(), &qwMsg);
+ QW_SCH_TASK_DLOG("prerocessQuery end, handle:%p, code:%x", pMsg->info.handle, code);
+
+ tFreeSSubQueryMsg(&msg);
return TSDB_CODE_SUCCESS;
}
@@ -355,19 +395,25 @@ int32_t qWorkerAbortPreprocessQueryMsg(void *qWorkerMgmt, SRpcMsg *pMsg) {
QW_ERR_RET(TSDB_CODE_QRY_INVALID_INPUT);
}
- SSubQueryMsg *msg = pMsg->pCont;
SQWorker *mgmt = (SQWorker *)qWorkerMgmt;
+ SSubQueryMsg msg = {0};
+ if (tDeserializeSSubQueryMsg(pMsg->pCont, pMsg->contLen, &msg) < 0) {
+ QW_ELOG("tDeserializeSSubQueryMsg failed, contLen:%d", pMsg->contLen);
+ QW_ERR_RET(TSDB_CODE_QRY_INVALID_INPUT);
+ }
- uint64_t sId = msg->sId;
- uint64_t qId = msg->queryId;
- uint64_t tId = msg->taskId;
- int64_t rId = msg->refId;
- int32_t eId = msg->execId;
+ uint64_t sId = msg.sId;
+ uint64_t qId = msg.queryId;
+ uint64_t tId = msg.taskId;
+ int64_t rId = msg.refId;
+ int32_t eId = msg.execId;
QW_SCH_TASK_DLOG("Abort prerocessQuery start, handle:%p", pMsg->info.handle);
qwAbortPrerocessQuery(QW_FPARAMS());
QW_SCH_TASK_DLOG("Abort prerocessQuery end, handle:%p", pMsg->info.handle);
+ tFreeSSubQueryMsg(&msg);
+
return TSDB_CODE_SUCCESS;
}
@@ -377,42 +423,41 @@ int32_t qWorkerProcessQueryMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int
}
int32_t code = 0;
- SSubQueryMsg *msg = pMsg->pCont;
SQWorker *mgmt = (SQWorker *)qWorkerMgmt;
qwUpdateTimeInQueue(mgmt, ts, QUERY_QUEUE);
QW_STAT_INC(mgmt->stat.msgStat.queryProcessed, 1);
- if (NULL == msg || pMsg->contLen <= sizeof(*msg)) {
- QW_ELOG("invalid query msg, msg:%p, msgLen:%d", msg, pMsg->contLen);
+ SSubQueryMsg msg = {0};
+ if (tDeserializeSSubQueryMsg(pMsg->pCont, pMsg->contLen, &msg) < 0) {
+ QW_ELOG("tDeserializeSSubQueryMsg failed, contLen:%d", pMsg->contLen);
QW_ERR_RET(TSDB_CODE_QRY_INVALID_INPUT);
}
- uint64_t sId = msg->sId;
- uint64_t qId = msg->queryId;
- uint64_t tId = msg->taskId;
- int64_t rId = msg->refId;
- int32_t eId = msg->execId;
+ uint64_t sId = msg.sId;
+ uint64_t qId = msg.queryId;
+ uint64_t tId = msg.taskId;
+ int64_t rId = msg.refId;
+ int32_t eId = msg.execId;
SQWMsg qwMsg = {.node = node,
- .msg = msg->msg + msg->sqlLen,
- .msgLen = msg->phyLen,
+ .msg = msg.msg,
+ .msgLen = msg.msgLen,
.connInfo = pMsg->info,
.msgType = pMsg->msgType};
- qwMsg.msgInfo.explain = msg->explain;
- qwMsg.msgInfo.taskType = msg->taskType;
- qwMsg.msgInfo.needFetch = msg->needFetch;
+ qwMsg.msgInfo.explain = msg.explain;
+ qwMsg.msgInfo.taskType = msg.taskType;
+ qwMsg.msgInfo.needFetch = msg.needFetch;
- char *sql = strndup(msg->msg, msg->sqlLen);
QW_SCH_TASK_DLOG("processQuery start, node:%p, type:%s, handle:%p, SQL:%s", node, TMSG_INFO(pMsg->msgType),
- pMsg->info.handle, sql);
- QW_ERR_JRET(qwProcessQuery(QW_FPARAMS(), &qwMsg, sql));
+ pMsg->info.handle, msg.sql);
+ code = qwProcessQuery(QW_FPARAMS(), &qwMsg, msg.sql);
+ msg.sql = NULL;
+ QW_SCH_TASK_DLOG("processQuery end, node:%p, code:%x", node, code);
-_return:
+ tFreeSSubQueryMsg(&msg);
- QW_SCH_TASK_DLOG("processQuery end, node:%p, code:%d", node, code);
-
- return code;
+ return TSDB_CODE_SUCCESS;
}
int32_t qWorkerProcessCQueryMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_t ts) {
@@ -548,28 +593,22 @@ int32_t qWorkerProcessDropMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int6
}
int32_t code = 0;
- STaskDropReq *msg = pMsg->pCont;
SQWorker *mgmt = (SQWorker *)qWorkerMgmt;
qwUpdateTimeInQueue(mgmt, ts, FETCH_QUEUE);
QW_STAT_INC(mgmt->stat.msgStat.dropProcessed, 1);
- if (NULL == msg || pMsg->contLen < sizeof(*msg)) {
- QW_ELOG("invalid task drop msg, msg:%p, msgLen:%d", msg, pMsg->contLen);
+ STaskDropReq msg = {0};
+ if (tDeserializeSTaskDropReq(pMsg->pCont, pMsg->contLen, &msg) < 0) {
+ QW_ELOG("tDeserializeSTaskDropReq failed, contLen:%d", pMsg->contLen);
QW_ERR_RET(TSDB_CODE_QRY_INVALID_INPUT);
}
- msg->sId = be64toh(msg->sId);
- msg->queryId = be64toh(msg->queryId);
- msg->taskId = be64toh(msg->taskId);
- msg->refId = be64toh(msg->refId);
- msg->execId = ntohl(msg->execId);
-
- uint64_t sId = msg->sId;
- uint64_t qId = msg->queryId;
- uint64_t tId = msg->taskId;
- int64_t rId = msg->refId;
- int32_t eId = msg->execId;
+ uint64_t sId = msg.sId;
+ uint64_t qId = msg.queryId;
+ uint64_t tId = msg.taskId;
+ int64_t rId = msg.refId;
+ int32_t eId = msg.execId;
SQWMsg qwMsg = {.node = node, .msg = NULL, .msgLen = 0, .code = pMsg->code, .connInfo = pMsg->info};
diff --git a/source/libs/qworker/test/qworkerTests.cpp b/source/libs/qworker/test/qworkerTests.cpp
index 6078a2a3ac..8a48977c77 100644
--- a/source/libs/qworker/test/qworkerTests.cpp
+++ b/source/libs/qworker/test/qworkerTests.cpp
@@ -114,7 +114,7 @@ void qwtBuildQueryReqMsg(SRpcMsg *queryRpc) {
qwtqueryMsg.queryId = htobe64(atomic_add_fetch_64(&qwtTestQueryId, 1));
qwtqueryMsg.sId = htobe64(1);
qwtqueryMsg.taskId = htobe64(1);
- qwtqueryMsg.phyLen = htonl(100);
+ qwtqueryMsg.msgLen = htonl(100);
qwtqueryMsg.sqlLen = 0;
queryRpc->msgType = TDMT_SCH_QUERY;
queryRpc->pCont = &qwtqueryMsg;
@@ -131,12 +131,29 @@ void qwtBuildFetchReqMsg(SResFetchReq *fetchMsg, SRpcMsg *fetchRpc) {
}
void qwtBuildDropReqMsg(STaskDropReq *dropMsg, SRpcMsg *dropRpc) {
- dropMsg->sId = htobe64(1);
- dropMsg->queryId = htobe64(atomic_load_64(&qwtTestQueryId));
- dropMsg->taskId = htobe64(1);
+ dropMsg->sId = 1;
+ dropMsg->queryId = atomic_load_64(&qwtTestQueryId);
+ dropMsg->taskId = 1;
+
+ int32_t msgSize = tSerializeSTaskDropReq(NULL, 0, dropMsg);
+ if (msgSize < 0) {
+ return;
+ }
+
+ char *msg = (char*)taosMemoryCalloc(1, msgSize);
+ if (NULL == msg) {
+ return;
+ }
+
+ if (tSerializeSTaskDropReq(msg, msgSize, dropMsg) < 0) {
+ taosMemoryFree(msg);
+ return;
+ }
+
+
dropRpc->msgType = TDMT_SCH_DROP_TASK;
- dropRpc->pCont = dropMsg;
- dropRpc->contLen = sizeof(STaskDropReq);
+ dropRpc->pCont = msg;
+ dropRpc->contLen = msgSize;
}
int32_t qwtStringToPlan(const char *str, SSubplan **subplan) {
diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c
index 336bc6d533..5496c5d1ab 100644
--- a/source/libs/scalar/src/sclfunc.c
+++ b/source/libs/scalar/src/sclfunc.c
@@ -24,6 +24,8 @@ static double tlog2(double v, double base) {
return a;
} else if (isnan(b) || isinf(b)) {
return b;
+ } else if (b == 0) {
+ return INFINITY;
} else {
return a / b;
}
diff --git a/source/libs/scheduler/src/schRemote.c b/source/libs/scheduler/src/schRemote.c
index a6a2a6c301..b0bc0df850 100644
--- a/source/libs/scheduler/src/schRemote.c
+++ b/source/libs/scheduler/src/schRemote.c
@@ -334,17 +334,17 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
SCH_ERR_JRET(TSDB_CODE_QRY_INVALID_INPUT);
}
- SQueryTableRsp *rsp = (SQueryTableRsp *)msg;
- rsp->code = ntohl(rsp->code);
- rsp->sversion = ntohl(rsp->sversion);
- rsp->tversion = ntohl(rsp->tversion);
- rsp->affectedRows = be64toh(rsp->affectedRows);
+ SQueryTableRsp rsp = {0};
+ if (tDeserializeSQueryTableRsp(msg, msgSize, &rsp) < 0) {
+ SCH_TASK_ELOG("tDeserializeSQueryTableRsp failed, msgSize:%d", msgSize);
+ SCH_ERR_JRET(TSDB_CODE_QRY_INVALID_MSG);
+ }
+
+ SCH_ERR_JRET(rsp.code);
- SCH_ERR_JRET(rsp->code);
+ SCH_ERR_JRET(schSaveJobExecRes(pJob, &rsp));
- SCH_ERR_JRET(schSaveJobExecRes(pJob, rsp));
-
- atomic_add_fetch_32(&pJob->resNumOfRows, rsp->affectedRows);
+ atomic_add_fetch_32(&pJob->resNumOfRows, rsp.affectedRows);
taosMemoryFreeClear(msg);
@@ -1042,30 +1042,40 @@ int32_t schBuildAndSendMsg(SSchJob *pJob, SSchTask *pTask, SQueryNodeAddr *addr,
case TDMT_SCH_MERGE_QUERY: {
SCH_ERR_RET(schMakeQueryRpcCtx(pJob, pTask, &rpcCtx));
- uint32_t len = strlen(pJob->sql);
- msgSize = sizeof(SSubQueryMsg) + pTask->msgLen + len;
+ SSubQueryMsg qMsg;
+ qMsg.header.vgId = addr->nodeId;
+ qMsg.header.contLen = 0;
+ qMsg.sId = schMgmt.sId;
+ qMsg.queryId = pJob->queryId;
+ qMsg.taskId = pTask->taskId;
+ qMsg.refId = pJob->refId;
+ qMsg.execId = pTask->execId;
+ qMsg.msgMask = (pTask->plan->showRewrite) ? QUERY_MSG_MASK_SHOW_REWRITE() : 0;
+ qMsg.taskType = TASK_TYPE_TEMP;
+ qMsg.explain = SCH_IS_EXPLAIN_JOB(pJob);
+ qMsg.needFetch = SCH_TASK_NEED_FETCH(pTask);
+ qMsg.sqlLen = strlen(pJob->sql);
+ qMsg.sql = pJob->sql;
+ qMsg.msgLen = pTask->msgLen;
+ qMsg.msg = pTask->msg;
+
+ msgSize = tSerializeSSubQueryMsg(NULL, 0, &qMsg);
+ if (msgSize < 0) {
+ SCH_TASK_ELOG("tSerializeSSubQueryMsg get size, msgSize:%d", msgSize);
+ SCH_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
msg = taosMemoryCalloc(1, msgSize);
if (NULL == msg) {
SCH_TASK_ELOG("calloc %d failed", msgSize);
SCH_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
- SSubQueryMsg *pMsg = msg;
- pMsg->header.vgId = htonl(addr->nodeId);
- pMsg->sId = htobe64(schMgmt.sId);
- pMsg->queryId = htobe64(pJob->queryId);
- pMsg->taskId = htobe64(pTask->taskId);
- pMsg->refId = htobe64(pJob->refId);
- pMsg->execId = htonl(pTask->execId);
- pMsg->taskType = TASK_TYPE_TEMP;
- pMsg->explain = SCH_IS_EXPLAIN_JOB(pJob);
- pMsg->needFetch = SCH_TASK_NEED_FETCH(pTask);
- pMsg->phyLen = htonl(pTask->msgLen);
- pMsg->sqlLen = htonl(len);
- pMsg->msgMask = htonl((pTask->plan->showRewrite) ? QUERY_MSG_MASK_SHOW_REWRITE() : 0);
-
- memcpy(pMsg->msg, pJob->sql, len);
- memcpy(pMsg->msg + len, pTask->msg, pTask->msgLen);
+ if (tSerializeSSubQueryMsg(msg, msgSize, &qMsg) < 0) {
+ SCH_TASK_ELOG("tSerializeSSubQueryMsg failed, msgSize:%d", msgSize);
+ taosMemoryFree(msg);
+ SCH_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
persistHandle = true;
SCH_SET_TASK_HANDLE(pTask, rpcAllocHandle());
@@ -1092,22 +1102,32 @@ int32_t schBuildAndSendMsg(SSchJob *pJob, SSchTask *pTask, SQueryNodeAddr *addr,
break;
}
case TDMT_SCH_DROP_TASK: {
- msgSize = sizeof(STaskDropReq);
+ STaskDropReq qMsg;
+ qMsg.header.vgId = addr->nodeId;
+ qMsg.header.contLen = 0;
+ qMsg.sId = schMgmt.sId;
+ qMsg.queryId = pJob->queryId;
+ qMsg.taskId = pTask->taskId;
+ qMsg.refId = pJob->refId;
+ qMsg.execId = pTask->execId;
+
+ msgSize = tSerializeSTaskDropReq(NULL, 0, &qMsg);
+ if (msgSize < 0) {
+ SCH_TASK_ELOG("tSerializeSTaskDropReq get size, msgSize:%d", msgSize);
+ SCH_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
+
msg = taosMemoryCalloc(1, msgSize);
if (NULL == msg) {
SCH_TASK_ELOG("calloc %d failed", msgSize);
SCH_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
- STaskDropReq *pMsg = msg;
-
- pMsg->header.vgId = htonl(addr->nodeId);
-
- pMsg->sId = htobe64(schMgmt.sId);
- pMsg->queryId = htobe64(pJob->queryId);
- pMsg->taskId = htobe64(pTask->taskId);
- pMsg->refId = htobe64(pJob->refId);
- pMsg->execId = htonl(pTask->execId);
+ if (tSerializeSTaskDropReq(msg, msgSize, &qMsg) < 0) {
+ SCH_TASK_ELOG("tSerializeSTaskDropReq failed, msgSize:%d", msgSize);
+ taosMemoryFree(msg);
+ SCH_ERR_RET(TSDB_CODE_QRY_OUT_OF_MEMORY);
+ }
break;
}
case TDMT_SCH_QUERY_HEARTBEAT: {
diff --git a/source/libs/sync/src/syncAppendEntriesReply.c b/source/libs/sync/src/syncAppendEntriesReply.c
index 13ea250155..c602788b19 100644
--- a/source/libs/sync/src/syncAppendEntriesReply.c
+++ b/source/libs/sync/src/syncAppendEntriesReply.c
@@ -67,6 +67,9 @@ int32_t syncNodeOnAppendEntriesReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
if (pMsg->matchIndex > oldMatchIndex) {
syncIndexMgrSetIndex(ths->pMatchIndex, &(pMsg->srcId), pMsg->matchIndex);
syncMaybeAdvanceCommitIndex(ths);
+
+ // maybe update minMatchIndex
+ ths->minMatchIndex = syncMinMatchIndex(ths);
}
syncIndexMgrSetIndex(ths->pNextIndex, &(pMsg->srcId), pMsg->matchIndex + 1);
diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c
index a427d7aa0c..88b8ba7e25 100644
--- a/source/libs/sync/src/syncMain.c
+++ b/source/libs/sync/src/syncMain.c
@@ -243,6 +243,18 @@ int32_t syncBeginSnapshot(int64_t rid, int64_t lastApplyIndex) {
goto _DEL_WAL;
} else {
+ lastApplyIndex -= SYNC_VNODE_LOG_RETENTION;
+
+ SyncIndex beginIndex = pSyncNode->pLogStore->syncLogBeginIndex(pSyncNode->pLogStore);
+ SyncIndex endIndex = pSyncNode->pLogStore->syncLogEndIndex(pSyncNode->pLogStore);
+ bool isEmpty = pSyncNode->pLogStore->syncLogIsEmpty(pSyncNode->pLogStore);
+
+ if (isEmpty || !(lastApplyIndex >= beginIndex && lastApplyIndex <= endIndex)) {
+ sNTrace(pSyncNode, "new-snapshot-index:%" PRId64 ", empty:%d, do not delete wal", lastApplyIndex, isEmpty);
+ syncNodeRelease(pSyncNode);
+ return 0;
+ }
+
// vnode
if (pSyncNode->replicaNum > 1) {
// multi replicas
@@ -300,26 +312,31 @@ int32_t syncBeginSnapshot(int64_t rid, int64_t lastApplyIndex) {
_DEL_WAL:
do {
- SyncIndex snapshottingIndex = atomic_load_64(&pSyncNode->snapshottingIndex);
+ SSyncLogStoreData* pData = pSyncNode->pLogStore->data;
+ SyncIndex snapshotVer = walGetSnapshotVer(pData->pWal);
+ SyncIndex walCommitVer = walGetCommittedVer(pData->pWal);
+ SyncIndex wallastVer = walGetLastVer(pData->pWal);
+ if (lastApplyIndex <= walCommitVer) {
+ SyncIndex snapshottingIndex = atomic_load_64(&pSyncNode->snapshottingIndex);
- if (snapshottingIndex == SYNC_INDEX_INVALID) {
- atomic_store_64(&pSyncNode->snapshottingIndex, lastApplyIndex);
- pSyncNode->snapshottingTime = taosGetTimestampMs();
+ if (snapshottingIndex == SYNC_INDEX_INVALID) {
+ atomic_store_64(&pSyncNode->snapshottingIndex, lastApplyIndex);
+ pSyncNode->snapshottingTime = taosGetTimestampMs();
+
+ code = walBeginSnapshot(pData->pWal, lastApplyIndex);
+ if (code == 0) {
+ sNTrace(pSyncNode, "wal snapshot begin, index:%" PRId64 ", last apply index:%" PRId64,
+ pSyncNode->snapshottingIndex, lastApplyIndex);
+ } else {
+ sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64,
+ terrstr(terrno), pSyncNode->snapshottingIndex, lastApplyIndex);
+ atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID);
+ }
- SSyncLogStoreData* pData = pSyncNode->pLogStore->data;
- code = walBeginSnapshot(pData->pWal, lastApplyIndex);
- if (code == 0) {
- sNTrace(pSyncNode, "wal snapshot begin, index:%" PRId64 ", last apply index:%" PRId64,
- pSyncNode->snapshottingIndex, lastApplyIndex);
} else {
- sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64,
- terrstr(terrno), pSyncNode->snapshottingIndex, lastApplyIndex);
- atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID);
+ sNTrace(pSyncNode, "snapshotting for %" PRId64 ", do not delete wal for new-snapshot-index:%" PRId64,
+ snapshottingIndex, lastApplyIndex);
}
-
- } else {
- sNTrace(pSyncNode, "snapshotting for %" PRId64 ", do not delete wal for new-snapshot-index:%" PRId64,
- snapshottingIndex, lastApplyIndex);
}
} while (0);
diff --git a/source/libs/sync/src/syncRaftLog.c b/source/libs/sync/src/syncRaftLog.c
index db0b6d1d02..2f824b6b3b 100644
--- a/source/libs/sync/src/syncRaftLog.c
+++ b/source/libs/sync/src/syncRaftLog.c
@@ -375,7 +375,17 @@ static int32_t raftLogGetLastEntry(SSyncLogStore* pLogStore, SSyncRaftEntry** pp
int32_t raftLogUpdateCommitIndex(SSyncLogStore* pLogStore, SyncIndex index) {
SSyncLogStoreData* pData = pLogStore->data;
SWal* pWal = pData->pWal;
- // ASSERT(walCommit(pWal, index) == 0);
+
+ // need not update
+ SyncIndex snapshotVer = walGetSnapshotVer(pWal);
+ SyncIndex walCommitVer = walGetCommittedVer(pWal);
+ SyncIndex wallastVer = walGetLastVer(pWal);
+
+ if (index < snapshotVer || index > wallastVer) {
+ // ignore
+ return 0;
+ }
+
int32_t code = walCommit(pWal, index);
if (code != 0) {
int32_t err = terrno;
diff --git a/source/libs/sync/src/syncTimeout.c b/source/libs/sync/src/syncTimeout.c
index 3d4583aadb..151e5cdf46 100644
--- a/source/libs/sync/src/syncTimeout.c
+++ b/source/libs/sync/src/syncTimeout.c
@@ -62,18 +62,20 @@ static int32_t syncNodeTimerRoutine(SSyncNode* ths) {
syncNodeCleanConfigIndex(ths);
}
- // end timeout wal snapshot
int64_t timeNow = taosGetTimestampMs();
- if (timeNow - ths->snapshottingIndex > SYNC_DEL_WAL_MS &&
- atomic_load_64(&ths->snapshottingIndex) != SYNC_INDEX_INVALID) {
- SSyncLogStoreData* pData = ths->pLogStore->data;
- int32_t code = walEndSnapshot(pData->pWal);
- if (code != 0) {
- sNError(ths, "timer wal snapshot end error since:%s", terrstr());
- return -1;
- } else {
- sNTrace(ths, "wal snapshot end, index:%" PRId64, atomic_load_64(&ths->snapshottingIndex));
- atomic_store_64(&ths->snapshottingIndex, SYNC_INDEX_INVALID);
+ if (atomic_load_64(&ths->snapshottingIndex) != SYNC_INDEX_INVALID) {
+ // end timeout wal snapshot
+ if (timeNow - ths->snapshottingTime > SYNC_DEL_WAL_MS &&
+ atomic_load_64(&ths->snapshottingIndex) != SYNC_INDEX_INVALID) {
+ SSyncLogStoreData* pData = ths->pLogStore->data;
+ int32_t code = walEndSnapshot(pData->pWal);
+ if (code != 0) {
+ sNError(ths, "timer wal snapshot end error since:%s", terrstr());
+ return -1;
+ } else {
+ sNTrace(ths, "wal snapshot end, index:%" PRId64, atomic_load_64(&ths->snapshottingIndex));
+ atomic_store_64(&ths->snapshottingIndex, SYNC_INDEX_INVALID);
+ }
}
}
diff --git a/source/libs/sync/src/syncUtil.c b/source/libs/sync/src/syncUtil.c
index b50336cd63..4fc7dd245d 100644
--- a/source/libs/sync/src/syncUtil.c
+++ b/source/libs/sync/src/syncUtil.c
@@ -239,11 +239,11 @@ void syncPrintNodeLog(const char* flags, ELogLevel level, int32_t dflag, SSyncNo
"vgId:%d, sync %s "
"%s"
", tm:%" PRIu64 ", cmt:%" PRId64 ", fst:%" PRId64 ", lst:%" PRId64 ", min:%" PRId64 ", snap:%" PRId64
- ", snap-tm:%" PRIu64 ", sby:%d, aq:%d, bch:%d, r-num:%d, lcfg:%" PRId64
+ ", snap-tm:%" PRIu64 ", sby:%d, aq:%d, snaping:%" PRId64 ", r-num:%d, lcfg:%" PRId64
", chging:%d, rsto:%d, dquorum:%d, elt:%" PRId64 ", hb:%" PRId64 ", %s, %s",
pNode->vgId, syncStr(pNode->state), eventLog, currentTerm, pNode->commitIndex, logBeginIndex,
logLastIndex, pNode->minMatchIndex, snapshot.lastApplyIndex, snapshot.lastApplyTerm,
- pNode->pRaftCfg->isStandBy, aqItems, pNode->pRaftCfg->batchSize, pNode->replicaNum,
+ pNode->pRaftCfg->isStandBy, aqItems, pNode->snapshottingIndex, pNode->replicaNum,
pNode->pRaftCfg->lastConfigIndex, pNode->changing, pNode->restoreFinish, quorum,
pNode->electTimerLogicClock, pNode->heartbeatTimerLogicClockUser, peerStr, cfgStr);
}
diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c
index 6cd127fed4..caae669e4a 100644
--- a/source/libs/wal/src/walWrite.c
+++ b/source/libs/wal/src/walWrite.c
@@ -325,7 +325,8 @@ int32_t walEndSnapshot(SWal *pWal) {
SWalFileInfo *pInfo = taosArraySearch(pWal->fileInfoSet, &tmp, compareWalFileInfo, TD_LE);
if (pInfo) {
if (ver >= pInfo->lastVer) {
- pInfo--;
+ //pInfo--;
+ pInfo++;
}
if (POINTER_DISTANCE(pInfo, pWal->fileInfoSet->pData) > 0) {
wDebug("vgId:%d, wal end remove for %" PRId64, pWal->cfg.vgId, pInfo->firstVer);
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index 890412f8eb..e4c6a40be8 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -416,208 +416,208 @@
,,,system-test,python3 ./test.py -f 0-others/sysinfo.py
,,,system-test,python3 ./test.py -f 0-others/user_control.py
,,,system-test,python3 ./test.py -f 0-others/fsync.py
-,,,system-test,python3 ./test.py -f 0-others/compatibility.py
+,,,system-test,python3 ./test.py -f 0-others/compatibility.py
,,,system-test,python3 ./test.py -f 1-insert/alter_database.py
,,,system-test,python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py
-,,,system-test,python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py
,,,system-test,python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py
,,,system-test,python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py
,,,system-test,python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py
-,,,system-test,python3 ./test.py -f 1-insert/alter_stable.py
-,,,system-test,python3 ./test.py -f 1-insert/alter_table.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_table.py
,,,system-test,python3 ./test.py -f 1-insert/boundary.py
,,,system-test,python3 ./test.py -f 1-insert/insertWithMoreVgroup.py
,,,system-test,python3 ./test.py -f 1-insert/table_comment.py
,,,system-test,python3 ./test.py -f 1-insert/time_range_wise.py
,,,system-test,python3 ./test.py -f 1-insert/block_wise.py
,,,system-test,python3 ./test.py -f 1-insert/create_retentions.py
-,,,system-test,python3 ./test.py -f 1-insert/table_param_ttl.py
,,,system-test,python3 ./test.py -f 1-insert/mutil_stage.py
-,,,system-test,python3 ./test.py -f 1-insert/table_param_ttl.py -R
-,,,system-test,python3 ./test.py -f 1-insert/update_data_muti_rows.py
-,,,system-test,python3 ./test.py -f 1-insert/db_tb_name_check.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data_muti_rows.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/db_tb_name_check.py
,,,system-test,python3 ./test.py -f 1-insert/database_pre_suf.py
,,,system-test,python3 ./test.py -f 1-insert/InsertFuturets.py
-,,,system-test,python3 ./test.py -f 0-others/show.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py
-,,,system-test,python3 ./test.py -f 2-query/abs.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py
-,,,system-test,python3 ./test.py -f 2-query/and_or_for_byte.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py
-,,,system-test,python3 ./test.py -f 2-query/apercentile.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py
-,,,system-test,python3 ./test.py -f 2-query/arccos.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py
-,,,system-test,python3 ./test.py -f 2-query/arcsin.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py
-,,,system-test,python3 ./test.py -f 2-query/arctan.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -R
,,,system-test,python3 ./test.py -f 2-query/avg.py
,,,system-test,python3 ./test.py -f 2-query/avg.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py
-,,,system-test,python3 ./test.py -f 2-query/between.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py
-,,,system-test,python3 ./test.py -f 2-query/bottom.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py
-,,,system-test,python3 ./test.py -f 2-query/cast.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py
-,,,system-test,python3 ./test.py -f 2-query/ceil.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py
-,,,system-test,python3 ./test.py -f 2-query/char_length.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py
-,,,system-test,python3 ./test.py -f 2-query/check_tsdb.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -R
,,,system-test,python3 ./test.py -f 2-query/concat.py
,,,system-test,python3 ./test.py -f 2-query/concat.py -R
,,,system-test,python3 ./test.py -f 2-query/concat_ws.py
,,,system-test,python3 ./test.py -f 2-query/concat_ws.py -R
,,,system-test,python3 ./test.py -f 2-query/concat_ws2.py
,,,system-test,python3 ./test.py -f 2-query/concat_ws2.py -R
-,,,system-test,python3 ./test.py -f 2-query/cos.py
-,,,system-test,python3 ./test.py -f 2-query/cos.py -R
-,,,system-test,python3 ./test.py -f 2-query/count_partition.py
-,,,system-test,python3 ./test.py -f 2-query/count_partition.py -R
-,,,system-test,python3 ./test.py -f 2-query/count.py
-,,,system-test,python3 ./test.py -f 2-query/count.py -R
-,,,system-test,python3 ./test.py -f 2-query/countAlwaysReturnValue.py
-,,,system-test,python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R
-,,,system-test,python3 ./test.py -f 2-query/db.py
-,,,system-test,python3 ./test.py -f 2-query/db.py -R
-,,,system-test,python3 ./test.py -f 2-query/diff.py
-,,,system-test,python3 ./test.py -f 2-query/diff.py -R
-,,,system-test,python3 ./test.py -f 2-query/distinct.py
-,,,system-test,python3 ./test.py -f 2-query/distinct.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_apercentile.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_apercentile.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_avg.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_avg.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_count.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_count.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_max.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_max.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_min.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_min.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_spread.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_spread.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_stddev.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_stddev.py -R
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_sum.py
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_sum.py -R
-,,,system-test,python3 ./test.py -f 2-query/explain.py
-,,,system-test,python3 ./test.py -f 2-query/explain.py -R
-,,,system-test,python3 ./test.py -f 2-query/first.py
-,,,system-test,python3 ./test.py -f 2-query/first.py -R
-,,,system-test,python3 ./test.py -f 2-query/floor.py
-,,,system-test,python3 ./test.py -f 2-query/floor.py -R
-,,,system-test,python3 ./test.py -f 2-query/function_null.py
-,,,system-test,python3 ./test.py -f 2-query/function_null.py -R
-,,,system-test,python3 ./test.py -f 2-query/function_stateduration.py
-,,,system-test,python3 ./test.py -f 2-query/function_stateduration.py -R
-,,,system-test,python3 ./test.py -f 2-query/histogram.py
-,,,system-test,python3 ./test.py -f 2-query/histogram.py -R
-,,,system-test,python3 ./test.py -f 2-query/hyperloglog.py
-,,,system-test,python3 ./test.py -f 2-query/hyperloglog.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -R
,,,system-test,python3 ./test.py -f 2-query/interp.py
,,,system-test,python3 ./test.py -f 2-query/interp.py -R
-,,,system-test,python3 ./test.py -f 2-query/irate.py
-,,,system-test,python3 ./test.py -f 2-query/irate.py -R
-,,,system-test,python3 ./test.py -f 2-query/join.py
-,,,system-test,python3 ./test.py -f 2-query/join.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -R
,,,system-test,python3 ./test.py -f 2-query/last_row.py
,,,system-test,python3 ./test.py -f 2-query/last_row.py -R
-,,,system-test,python3 ./test.py -f 2-query/last.py
-,,,system-test,python3 ./test.py -f 2-query/last.py -R
-,,,system-test,python3 ./test.py -f 2-query/leastsquares.py
-,,,system-test,python3 ./test.py -f 2-query/leastsquares.py -R
-,,,system-test,python3 ./test.py -f 2-query/length.py
-,,,system-test,python3 ./test.py -f 2-query/length.py -R
-,,,system-test,python3 ./test.py -f 2-query/log.py
-,,,system-test,python3 ./test.py -f 2-query/log.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -R
,,,system-test,python3 ./test.py -f 2-query/lower.py
,,,system-test,python3 ./test.py -f 2-query/lower.py -R
,,,system-test,python3 ./test.py -f 2-query/ltrim.py
,,,system-test,python3 ./test.py -f 2-query/ltrim.py -R
-,,,system-test,python3 ./test.py -f 2-query/mavg.py
-,,,system-test,python3 ./test.py -f 2-query/mavg.py -R
-,,,system-test,python3 ./test.py -f 2-query/max_partition.py
-,,,system-test,python3 ./test.py -f 2-query/max_partition.py -R
-,,,system-test,python3 ./test.py -f 2-query/max.py
-,,,system-test,python3 ./test.py -f 2-query/max.py -R
-,,,system-test,python3 ./test.py -f 2-query/min.py
-,,,system-test,python3 ./test.py -f 2-query/min.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -R
,,,system-test,python3 ./test.py -f 2-query/mode.py
,,,system-test,python3 ./test.py -f 2-query/mode.py -R
-,,,system-test,python3 ./test.py -f 2-query/Now.py
-,,,system-test,python3 ./test.py -f 2-query/Now.py -R
-,,,system-test,python3 ./test.py -f 2-query/percentile.py
-,,,system-test,python3 ./test.py -f 2-query/percentile.py -R
-,,,system-test,python3 ./test.py -f 2-query/pow.py
-,,,system-test,python3 ./test.py -f 2-query/pow.py -R
-,,,system-test,python3 ./test.py -f 2-query/query_cols_tags_and_or.py
-,,,system-test,python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R
-,,,system-test,python3 ./test.py -f 2-query/round.py
-,,,system-test,python3 ./test.py -f 2-query/round.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -R
,,,system-test,python3 ./test.py -f 2-query/rtrim.py
,,,system-test,python3 ./test.py -f 2-query/rtrim.py -R
-,,,system-test,python3 ./test.py -f 2-query/sample.py
-,,,system-test,python3 ./test.py -f 2-query/sample.py -R
-,,,system-test,python3 ./test.py -f 2-query/sin.py
-,,,system-test,python3 ./test.py -f 2-query/sin.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -R
,,,system-test,python3 ./test.py -f 2-query/smaTest.py
,,,system-test,python3 ./test.py -f 2-query/smaTest.py -R
,,,system-test,python3 ./test.py -f 2-query/sml.py
,,,system-test,python3 ./test.py -f 2-query/sml.py -R
-,,,system-test,python3 ./test.py -f 2-query/spread.py
-,,,system-test,python3 ./test.py -f 2-query/spread.py -R
-,,,system-test,python3 ./test.py -f 2-query/sqrt.py
-,,,system-test,python3 ./test.py -f 2-query/sqrt.py -R
-,,,system-test,python3 ./test.py -f 2-query/statecount.py
-,,,system-test,python3 ./test.py -f 2-query/statecount.py -R
-,,,system-test,python3 ./test.py -f 2-query/stateduration.py
-,,,system-test,python3 ./test.py -f 2-query/stateduration.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -R
,,,system-test,python3 ./test.py -f 2-query/substr.py
,,,system-test,python3 ./test.py -f 2-query/substr.py -R
-,,,system-test,python3 ./test.py -f 2-query/sum.py
-,,,system-test,python3 ./test.py -f 2-query/sum.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -R
,,,system-test,python3 ./test.py -f 2-query/tail.py
,,,system-test,python3 ./test.py -f 2-query/tail.py -R
-,,,system-test,python3 ./test.py -f 2-query/tan.py
-,,,system-test,python3 ./test.py -f 2-query/tan.py -R
-,,,system-test,python3 ./test.py -f 2-query/Timediff.py
-,,,system-test,python3 ./test.py -f 2-query/Timediff.py -R
-,,,system-test,python3 ./test.py -f 2-query/timetruncate.py
-,,,system-test,python3 ./test.py -f 2-query/timetruncate.py -R
-,,,system-test,python3 ./test.py -f 2-query/timezone.py
-,,,system-test,python3 ./test.py -f 2-query/timezone.py -R
-,,,system-test,python3 ./test.py -f 2-query/To_iso8601.py
-,,,system-test,python3 ./test.py -f 2-query/To_iso8601.py -R
-,,,system-test,python3 ./test.py -f 2-query/To_unixtimestamp.py
-,,,system-test,python3 ./test.py -f 2-query/To_unixtimestamp.py -R
-,,,system-test,python3 ./test.py -f 2-query/Today.py
-,,,system-test,python3 ./test.py -f 2-query/Today.py -R
-,,,system-test,python3 ./test.py -f 2-query/top.py
-,,,system-test,python3 ./test.py -f 2-query/top.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -R
,,,system-test,python3 ./test.py -f 2-query/tsbsQuery.py
,,,system-test,python3 ./test.py -f 2-query/tsbsQuery.py -R
-,,,system-test,python3 ./test.py -f 2-query/ttl_comment.py
-,,,system-test,python3 ./test.py -f 2-query/ttl_comment.py -R
-,,,system-test,python3 ./test.py -f 2-query/twa.py
-,,,system-test,python3 ./test.py -f 2-query/twa.py -R
-,,,system-test,python3 ./test.py -f 2-query/union.py
-,,,system-test,python3 ./test.py -f 2-query/union.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -R
,,,system-test,python3 ./test.py -f 2-query/unique.py
,,,system-test,python3 ./test.py -f 2-query/unique.py -R
-,,,system-test,python3 ./test.py -f 2-query/upper.py
-,,,system-test,python3 ./test.py -f 2-query/upper.py -R
-,,,system-test,python3 ./test.py -f 2-query/varchar.py
-,,,system-test,python3 ./test.py -f 2-query/varchar.py -R
-,,,system-test,python3 ./test.py -f 2-query/case_when.py
-,,,system-test,python3 ./test.py -f 2-query/case_when.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -R
,,,system-test,python3 ./test.py -f 1-insert/update_data.py
,,,system-test,python3 ./test.py -f 1-insert/tb_100w_data_order.py
,,,system-test,python3 ./test.py -f 1-insert/delete_stable.py
,,,system-test,python3 ./test.py -f 1-insert/delete_childtable.py
,,,system-test,python3 ./test.py -f 1-insert/delete_normaltable.py
-,,,system-test,python3 ./test.py -f 1-insert/keep_expired.py
-,,,system-test,python3 ./test.py -f 2-query/join2.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/keep_expired.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py
,,,system-test,python3 ./test.py -f 2-query/union1.py
,,,system-test,python3 ./test.py -f 2-query/concat2.py
,,,system-test,python3 ./test.py -f 2-query/json_tag.py
@@ -627,9 +627,9 @@
,,,system-test,python3 ./test.py -f 2-query/nestedQuery_time.py
,,,system-test,python3 ./test.py -f 2-query/stablity.py
,,,system-test,python3 ./test.py -f 2-query/stablity_1.py
-,,,system-test,python3 ./test.py -f 2-query/elapsed.py
-,,,system-test,python3 ./test.py -f 2-query/csum.py
-,,,system-test,python3 ./test.py -f 2-query/function_diff.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py
,,,system-test,python3 ./test.py -f 2-query/queryQnode.py
,,,system-test,python3 ./test.py -f 6-cluster/5dnode1mnode.py
,,,system-test,python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5
@@ -666,7 +666,7 @@
,,,system-test,python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py -N 4 -M 1
,,,system-test,python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py -N 4 -M 1
,,,system-test,python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py -N 4 -M 1
-,,,system-test,python3 ./test.py -f 7-tmq/create_wrong_topic.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py
,,,system-test,python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3
,,,system-test,python3 ./test.py -f 7-tmq/basic5.py
,,,system-test,python3 ./test.py -f 7-tmq/subscribeDb.py
@@ -724,18 +724,18 @@
,,,system-test,python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py
,,,system-test,python3 ./test.py -f 99-TDcase/TD-19201.py
,,,system-test,python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5
-,,,system-test,python3 ./test.py -f 2-query/between.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distinct.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/varchar.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/ltrim.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/rtrim.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/length.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/char_length.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/upper.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/lower.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/join.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/join2.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/cast.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/substr.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/union.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/union1.py -Q 2
@@ -743,45 +743,45 @@
,,,system-test,python3 ./test.py -f 2-query/concat2.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/concat_ws.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/concat_ws2.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/check_tsdb.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/spread.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/hyperloglog.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/explain.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/leastsquares.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/timezone.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/Now.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/Today.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/max.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/min.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/mode.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/count.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/last.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/first.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/To_iso8601.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/timetruncate.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/diff.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/Timediff.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/json_tag.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/top.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/bottom.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/percentile.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/apercentile.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/abs.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/ceil.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/floor.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/round.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/log.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/pow.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/sqrt.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/sin.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/cos.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/tan.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/arcsin.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/arccos.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/arctan.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/interp.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/nestedQuery.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2
@@ -792,44 +792,44 @@
,,,system-test,python3 ./test.py -f 2-query/avg.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/elapsed.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/csum.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/mavg.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/sample.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/function_diff.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/unique.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/stateduration.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/function_stateduration.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/statecount.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/tail.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/ttl_comment.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_count.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_max.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_min.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/twa.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/irate.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/function_null.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/count_partition.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/max_partition.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/last_row.py -Q 2
,,,system-test,python3 ./test.py -f 2-query/tsbsQuery.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/sml.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/case_when.py -Q 2
-,,,system-test,python3 ./test.py -f 2-query/between.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distinct.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/varchar.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/ltrim.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/rtrim.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/length.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/char_length.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/upper.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/lower.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/join.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/join2.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/cast.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/substr.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/union.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/union1.py -Q 3
@@ -837,45 +837,45 @@
,,,system-test,python3 ./test.py -f 2-query/concat2.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/concat_ws.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/concat_ws2.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/check_tsdb.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/spread.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/hyperloglog.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/explain.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/leastsquares.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/timezone.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/Now.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/Today.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/max.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/min.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/mode.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/count.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/last.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/first.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/To_iso8601.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/timetruncate.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/diff.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/Timediff.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/json_tag.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/top.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/bottom.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/percentile.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/apercentile.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/abs.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/ceil.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/floor.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/round.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/log.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/pow.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/sqrt.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/sin.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/cos.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/tan.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/arcsin.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/arccos.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/arctan.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/nestedQuery.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3
@@ -885,43 +885,43 @@
,,,system-test,python3 ./test.py -f 2-query/avg.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/elapsed.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/csum.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/mavg.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/sample.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/function_diff.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/unique.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/stateduration.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/function_stateduration.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/statecount.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/tail.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/ttl_comment.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_count.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_max.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_min.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/twa.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/irate.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/function_null.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/count_partition.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/max_partition.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/last_row.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/tsbsQuery.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/sml.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3
,,,system-test,python3 ./test.py -f 2-query/interp.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/case_when.py -Q 3
-,,,system-test,python3 ./test.py -f 2-query/between.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distinct.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/varchar.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/ltrim.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/rtrim.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/length.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/char_length.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/upper.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/lower.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/join.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/join2.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/substr.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/union.py -Q 4
@@ -930,45 +930,45 @@
,,,system-test,python3 ./test.py -f 2-query/concat2.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/concat_ws.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/concat_ws2.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/check_tsdb.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/spread.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/hyperloglog.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/explain.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/leastsquares.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/timezone.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/Now.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/Today.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/max.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/min.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/mode.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/count.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/last.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/first.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/To_iso8601.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/timetruncate.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/diff.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/Timediff.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/json_tag.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/top.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/bottom.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/percentile.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/apercentile.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/abs.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/ceil.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/floor.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/round.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/log.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/pow.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/sqrt.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/sin.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/cos.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/tan.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/arcsin.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/arccos.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/arctan.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/nestedQuery.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4
@@ -978,33 +978,34 @@
,,,system-test,python3 ./test.py -f 2-query/avg.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/elapsed.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/csum.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/mavg.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/sample.py -Q 4
+,,,system-test,python3 ./test.py -f 2-query/cast.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/function_diff.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/unique.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/stateduration.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/function_stateduration.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/statecount.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/tail.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/ttl_comment.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_count.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_max.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_min.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/twa.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/irate.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/function_null.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/count_partition.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/max_partition.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/last_row.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/tsbsQuery.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/sml.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4
,,,system-test,python3 ./test.py -f 2-query/interp.py -Q 4
-,,,system-test,python3 ./test.py -f 2-query/case_when.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 4
#develop test
,,,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py
diff --git a/tests/system-test/pytest.sh b/tests/system-test/pytest.sh
index 3f03058342..148f80eca3 100755
--- a/tests/system-test/pytest.sh
+++ b/tests/system-test/pytest.sh
@@ -77,13 +77,14 @@ echo "Preload AsanSo:" $?
$* -a 2> $AsanFile
unset LD_PRELOAD
-AsanFileLen=`cat $AsanFile | wc -l`
-while [ $AsanFileLen -lt 10 ]
+for ((i=1;i<=20;i++))
do
- sleep 1
- `cat $AsanFile | wc -l`
+ AsanFileLen=`cat $AsanFile | wc -l`
+ echo "AsanFileLen:" $AsanFileLen
+ if [ $AsanFileLen -gt 10 ]; then
+ break
+ fi
done
-echo "AsanFileLen:" $AsanFileLen
AsanFileSuccessLen=`grep -w successfully $AsanFile | wc -l`
echo "AsanFileSuccessLen:" $AsanFileSuccessLen
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 0f3c383b9e..d61d25602b 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -101,19 +101,20 @@ ELSE ()
BUILD_COMMAND
COMMAND set CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../include/client
COMMAND set CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/build/lib
- COMMAND go build -a -o taosadapter.exe -ldflags "-s -w -X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
- COMMAND go build -a -o taosadapter-debug.exe -ldflags "-X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
+ COMMAND go build -a -o taosadapter.exe -ldflags "-X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
+# COMMAND go build -a -o taosadapter.exe -ldflags "-s -w -X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
+# COMMAND go build -a -o taosadapter-debug.exe -ldflags "-X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
INSTALL_COMMAND
- COMMAND cmake -E echo "Comparessing taosadapter.exe"
- COMMAND cmake -E time upx taosadapter.exe
+# COMMAND cmake -E echo "Comparessing taosadapter.exe"
+# COMMAND cmake -E time upx taosadapter.exe
COMMAND cmake -E echo "Copy taosadapter.exe"
COMMAND cmake -E copy taosadapter.exe ${CMAKE_BINARY_DIR}/build/bin/taosadapter.exe
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test/cfg/
COMMAND cmake -E echo "Copy taosadapter.toml"
COMMAND cmake -E copy ./example/config/taosadapter.toml ${CMAKE_BINARY_DIR}/test/cfg/
- COMMAND cmake -E echo "Copy taosadapter-debug.exe"
- COMMAND cmake -E copy taosadapter-debug.exe ${CMAKE_BINARY_DIR}/build/bin
+# COMMAND cmake -E echo "Copy taosadapter-debug.exe"
+# COMMAND cmake -E copy taosadapter-debug.exe ${CMAKE_BINARY_DIR}/build/bin
)
ELSE (TD_WINDOWS)
MESSAGE("Building taosAdapter on non-Windows")
@@ -128,19 +129,20 @@ ELSE ()
PATCH_COMMAND
COMMAND git clean -f -d
BUILD_COMMAND
- COMMAND CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../include/client CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/build/lib go build -a -ldflags "-s -w -X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
- COMMAND CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../include/client CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/build/lib go build -a -o taosadapter-debug -ldflags "-X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
+ COMMAND CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../include/client CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/build/lib go build -a -ldflags "-X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
+# COMMAND CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../include/client CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/build/lib go build -a -ldflags "-s -w -X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
+# COMMAND CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../include/client CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/build/lib go build -a -o taosadapter-debug -ldflags "-X github.com/taosdata/taosadapter/v3/version.Version=${taos_version} -X github.com/taosdata/taosadapter/v3/version.CommitID=${taosadapter_commit_sha1}"
INSTALL_COMMAND
- COMMAND cmake -E echo "Comparessing taosadapter.exe"
- COMMAND upx taosadapter || :
+# COMMAND cmake -E echo "Comparessing taosadapter.exe"
+# COMMAND upx taosadapter || :
COMMAND cmake -E echo "Copy taosadapter"
COMMAND cmake -E copy taosadapter ${CMAKE_BINARY_DIR}/build/bin
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test/cfg/
COMMAND cmake -E echo "Copy taosadapter.toml"
COMMAND cmake -E copy ./example/config/taosadapter.toml ${CMAKE_BINARY_DIR}/test/cfg/
COMMAND cmake -E copy ./taosadapter.service ${CMAKE_BINARY_DIR}/test/cfg/
- COMMAND cmake -E echo "Copy taosadapter-debug"
- COMMAND cmake -E copy taosadapter-debug ${CMAKE_BINARY_DIR}/build/bin
+# COMMAND cmake -E echo "Copy taosadapter-debug"
+# COMMAND cmake -E copy taosadapter-debug ${CMAKE_BINARY_DIR}/build/bin
)
ENDIF (TD_WINDOWS)
ENDIF ()