From 835886d11e0337078631e7bec476dd89a84c08e4 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 22 Mar 2021 18:44:06 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 3393 taosdemo timestamp rework (#5531) * [TD-3393] : taosdemo timestamp rework. change default timestamp step to 1ms. * [TD-3393] : taosdemo timestamp rework. adjust shift timestamp logic to table sequence turn to start. Co-authored-by: Shuduo Sang --- src/kit/taosdemo/taosdemo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 0943e0b3a9..b390ee76cd 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -92,7 +92,7 @@ enum TEST_MODE { #define MAX_DATABASE_COUNT 256 #define INPUT_BUF_LEN 256 -#define DEFAULT_TIMESTAMP_STEP 10 +#define DEFAULT_TIMESTAMP_STEP 1 typedef enum CREATE_SUB_TALBE_MOD_EN { PRE_CREATE_SUBTBL, @@ -4519,7 +4519,6 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) { pstr += dataLen; recOfBatch += batchPerTbl; - startTime += batchPerTbl * superTblInfo->timeStampStep; pThreadInfo->totalInsertRows += batchPerTbl; verbosePrint("[%d] %s() LN%d batchPerTbl=%d recOfBatch=%d\n", @@ -4530,6 +4529,7 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) { if (insertMode == INTERLACE_INSERT_MODE) { if (tableSeq == pThreadInfo->start_table_from + pThreadInfo->ntables) { // turn to first table + startTime += batchPerTbl * superTblInfo->timeStampStep; tableSeq = pThreadInfo->start_table_from; generatedRecPerTbl += batchPerTbl; flagSleep = true; -- GitLab