Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
edbad457
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
edbad457
编写于
8月 18, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
other: add logs.
上级
f68650fe
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
49 addition
and
5 deletion
+49
-5
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+19
-0
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-0
source/libs/stream/inc/streamInt.h
source/libs/stream/inc/streamInt.h
+3
-2
source/libs/stream/src/stream.c
source/libs/stream/src/stream.c
+2
-2
source/libs/stream/src/streamData.c
source/libs/stream/src/streamData.c
+13
-0
source/libs/stream/src/streamQueue.c
source/libs/stream/src/streamQueue.c
+11
-1
未找到文件。
source/client/test/clientTests.cpp
浏览文件 @
edbad457
...
...
@@ -826,6 +826,25 @@ TEST(clientCase, projection_query_tables) {
}
taos_free_result
(
pRes
);
int64_t
start
=
1685959190000
;
int32_t
code
=
-
1
;
for
(
int32_t
i
=
0
;
i
<
1000000
;
++
i
)
{
char
t
[
512
]
=
{
0
};
sprintf
(
t
,
"insert into t1 values(%ld, %ld)"
,
start
+
i
,
i
);
while
(
1
)
{
void
*
p
=
taos_query
(
pConn
,
t
);
code
=
taos_errno
(
p
);
taos_free_result
(
p
);
if
(
code
!=
0
)
{
printf
(
"insert data error, retry
\n
"
);
}
else
{
break
;
}
}
}
for
(
int32_t
i
=
0
;
i
<
1
;
++
i
)
{
printf
(
"create table :%d
\n
"
,
i
);
createNewTable
(
pConn
,
i
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
edbad457
...
...
@@ -918,6 +918,7 @@ void freePtr(void* ptr) { taosMemoryFree(*(void**)ptr); }
int32_t
tqExpandTask
(
STQ
*
pTq
,
SStreamTask
*
pTask
,
int64_t
ver
)
{
int32_t
vgId
=
TD_VID
(
pTq
->
pVnode
);
tqDebug
(
"s-task:0x%x start to expand task"
,
pTask
->
id
.
taskId
);
int32_t
code
=
streamTaskInit
(
pTask
,
pTq
->
pStreamMeta
,
&
pTq
->
pVnode
->
msgCb
,
ver
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
source/libs/stream/inc/streamInt.h
浏览文件 @
edbad457
...
...
@@ -41,8 +41,9 @@ extern SStreamGlobalEnv streamEnv;
extern
int32_t
streamBackendId
;
extern
int32_t
streamBackendCfWrapperId
;
void
streamRetryDispatchStreamBlock
(
SStreamTask
*
pTask
,
int64_t
waitDuration
);
int32_t
streamDispatchStreamBlock
(
SStreamTask
*
pTask
);
const
char
*
streamGetBlockTypeStr
(
int32_t
type
);
void
streamRetryDispatchStreamBlock
(
SStreamTask
*
pTask
,
int64_t
waitDuration
);
int32_t
streamDispatchStreamBlock
(
SStreamTask
*
pTask
);
int32_t
streamProcessCheckpointBlock
(
SStreamTask
*
pTask
,
SStreamDataBlock
*
pBlock
);
SStreamDataBlock
*
createStreamBlockFromDispatchMsg
(
const
SStreamDispatchReq
*
pReq
,
int32_t
blockType
,
int32_t
srcVg
);
...
...
source/libs/stream/src/stream.c
浏览文件 @
edbad457
...
...
@@ -397,8 +397,8 @@ int32_t tAppendDataToInputQueue(SStreamTask* pTask, SStreamQueueItem* pItem) {
}
}
else
if
(
type
==
STREAM_INPUT__CHECKPOINT
||
type
==
STREAM_INPUT__CHECKPOINT_TRIGGER
||
type
==
STREAM_INPUT__TRANS_STATE
)
{
taosWriteQitem
(
pTask
->
inputQueue
->
queue
,
pItem
);
qDebug
(
"s-task:%s level:%d
checkpoint(trigger)/trans-state
blockdata enqueue, total in queue:%d, size:%.2fMiB"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
taskLevel
,
total
,
size
);
qDebug
(
"s-task:%s level:%d
%s
blockdata enqueue, total in queue:%d, size:%.2fMiB"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
taskLevel
,
streamGetBlockTypeStr
(
type
),
total
,
size
);
}
else
if
(
type
==
STREAM_INPUT__GET_RES
)
{
// use the default memory limit, refactor later.
taosWriteQitem
(
pTask
->
inputQueue
->
queue
,
pItem
);
...
...
source/libs/stream/src/streamData.c
浏览文件 @
edbad457
...
...
@@ -244,3 +244,16 @@ void streamFreeQitem(SStreamQueueItem* data) {
taosFreeQitem
(
pBlock
);
}
}
const
char
*
streamGetBlockTypeStr
(
int32_t
type
)
{
switch
(
type
)
{
case
STREAM_INPUT__CHECKPOINT
:
return
"checkpoint"
;
case
STREAM_INPUT__CHECKPOINT_TRIGGER
:
return
"checkpoint-triggre"
;
case
STREAM_INPUT__TRANS_STATE
:
return
"trans-state"
;
default:
return
""
;
}
}
\ No newline at end of file
source/libs/stream/src/streamQueue.c
浏览文件 @
edbad457
...
...
@@ -221,7 +221,17 @@ int32_t extractBlocksFromInputQ(SStreamTask* pTask, SStreamQueueItem** pInput, i
if
(
qItem
->
type
==
STREAM_INPUT__CHECKPOINT
||
qItem
->
type
==
STREAM_INPUT__CHECKPOINT_TRIGGER
||
qItem
->
type
==
STREAM_INPUT__TRANS_STATE
)
{
if
(
*
pInput
==
NULL
)
{
qDebug
(
"s-task:%s checkpoint/transtate msg extracted, start to process immediately"
,
id
);
char
*
p
=
NULL
;
if
(
qItem
->
type
==
STREAM_INPUT__CHECKPOINT
)
{
p
=
"checkpoint"
;
}
else
if
(
qItem
->
type
==
STREAM_INPUT__CHECKPOINT_TRIGGER
)
{
p
=
"checkpoint-trigger"
;
}
else
{
p
=
"transtate"
;
}
qDebug
(
"s-task:%s %s msg extracted, start to process immediately"
,
id
,
p
);
*
numOfBlocks
=
1
;
*
pInput
=
qItem
;
return
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录