Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e345023d
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e345023d
编写于
8月 03, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh(stream): keep thread from blocking
上级
08a4a7ab
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
13 deletion
+17
-13
source/common/src/tglobal.c
source/common/src/tglobal.c
+5
-6
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+2
-2
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+1
-0
source/libs/stream/src/streamData.c
source/libs/stream/src/streamData.c
+5
-4
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+4
-1
未找到文件。
source/common/src/tglobal.c
浏览文件 @
e345023d
...
...
@@ -18,8 +18,8 @@
#include "tcompare.h"
#include "tconfig.h"
#include "tdatablock.h"
#include "tlog.h"
#include "tgrant.h"
#include "tlog.h"
GRANT_CFG_DECLARE
;
...
...
@@ -389,7 +389,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
tsNumOfVnodeQueryThreads
=
TMAX
(
tsNumOfVnodeQueryThreads
,
4
);
if
(
cfgAddInt32
(
pCfg
,
"numOfVnodeQueryThreads"
,
tsNumOfVnodeQueryThreads
,
4
,
1024
,
0
)
!=
0
)
return
-
1
;
tsNumOfVnodeStreamThreads
=
tsNumOfCores
/
4
;
tsNumOfVnodeStreamThreads
=
tsNumOfCores
;
tsNumOfVnodeStreamThreads
=
TMAX
(
tsNumOfVnodeStreamThreads
,
4
);
if
(
cfgAddInt32
(
pCfg
,
"numOfVnodeStreamThreads"
,
tsNumOfVnodeStreamThreads
,
4
,
1024
,
0
)
!=
0
)
return
-
1
;
...
...
@@ -598,7 +598,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
return
0
;
}
void
taosLocalCfgForbiddenToChange
(
char
*
name
,
bool
*
forbidden
)
{
void
taosLocalCfgForbiddenToChange
(
char
*
name
,
bool
*
forbidden
)
{
int32_t
len
=
strlen
(
name
);
char
lowcaseName
[
CFG_NAME_MAX_LEN
+
1
]
=
{
0
};
strntolower
(
lowcaseName
,
name
,
TMIN
(
CFG_NAME_MAX_LEN
,
len
));
...
...
@@ -612,7 +612,6 @@ void taosLocalCfgForbiddenToChange(char* name, bool* forbidden) {
*
forbidden
=
false
;
}
int32_t
taosSetCfg
(
SConfig
*
pCfg
,
char
*
name
)
{
int32_t
len
=
strlen
(
name
);
char
lowcaseName
[
CFG_NAME_MAX_LEN
+
1
]
=
{
0
};
...
...
@@ -1114,12 +1113,12 @@ void taosCfgDynamicOptions(const char *option, const char *value) {
const
char
*
options
[]
=
{
"dDebugFlag"
,
"vDebugFlag"
,
"mDebugFlag"
,
"wDebugFlag"
,
"sDebugFlag"
,
"tsdbDebugFlag"
,
"tqDebugFlag"
,
"fsDebugFlag"
,
"udfDebugFlag"
,
"smaDebugFlag"
,
"idxDebugFlag"
,
"tdbDebugFlag"
,
"tmrDebugFlag"
,
"uDebugFlag"
,
"smaDebugFlag"
,
"rpcDebugFlag"
,
"qDebugFlag"
,
"metaDebugFlag"
,
"tmrDebugFlag"
,
"uDebugFlag"
,
"smaDebugFlag"
,
"rpcDebugFlag"
,
"qDebugFlag"
,
"metaDebugFlag"
,
};
int32_t
*
optionVars
[]
=
{
&
dDebugFlag
,
&
vDebugFlag
,
&
mDebugFlag
,
&
wDebugFlag
,
&
sDebugFlag
,
&
tsdbDebugFlag
,
&
tqDebugFlag
,
&
fsDebugFlag
,
&
udfDebugFlag
,
&
smaDebugFlag
,
&
idxDebugFlag
,
&
tdbDebugFlag
,
&
tmrDebugFlag
,
&
uDebugFlag
,
&
smaDebugFlag
,
&
rpcDebugFlag
,
&
qDebugFlag
,
&
metaDebugFlag
,
&
tmrDebugFlag
,
&
uDebugFlag
,
&
smaDebugFlag
,
&
rpcDebugFlag
,
&
qDebugFlag
,
&
metaDebugFlag
,
};
int32_t
optionSize
=
tListLen
(
options
);
...
...
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
e345023d
...
...
@@ -146,8 +146,8 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
pHead
->
vgId
);
if
(
pVnode
==
NULL
)
{
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
);
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
);
return
terrno
!=
0
?
terrno
:
-
1
;
}
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
e345023d
...
...
@@ -330,6 +330,7 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) {
case
TDMT_STREAM_TASK_RUN
:
return
tqProcessTaskRunReq
(
pVnode
->
pTq
,
pMsg
);
case
TDMT_STREAM_TASK_DISPATCH
:
// return tqProcessTaskDispatchReq(pVnode->pTq, pMsg, pInfo->workerId != 0);
return
tqProcessTaskDispatchReq
(
pVnode
->
pTq
,
pMsg
,
true
);
case
TDMT_STREAM_TASK_RECOVER
:
return
tqProcessTaskRecoverReq
(
pVnode
->
pTq
,
pMsg
);
...
...
source/libs/stream/src/streamData.c
浏览文件 @
e345023d
...
...
@@ -167,12 +167,13 @@ void streamFreeQitem(SStreamQueueItem* data) {
SStreamMergedSubmit
*
pMerge
=
(
SStreamMergedSubmit
*
)
data
;
int32_t
sz
=
taosArrayGetSize
(
pMerge
->
reqs
);
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
int32_t
*
ref
=
taosArrayGetP
(
pMerge
->
dataRefs
,
i
);
(
*
ref
)
--
;
if
(
*
ref
==
0
)
{
int32_t
*
pRef
=
taosArrayGetP
(
pMerge
->
dataRefs
,
i
);
int32_t
ref
=
atomic_sub_fetch_32
(
pRef
,
1
);
ASSERT
(
ref
>=
0
);
if
(
ref
==
0
)
{
void
*
data
=
taosArrayGetP
(
pMerge
->
reqs
,
i
);
taosMemoryFree
(
data
);
taosMemoryFree
(
r
ef
);
taosMemoryFree
(
pR
ef
);
}
}
taosArrayDestroy
(
pMerge
->
reqs
);
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
e345023d
...
...
@@ -72,7 +72,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, void* data, SArray* pRes)
continue
;
}
qDebug
(
"task %d(child %d) executed and get block"
);
qDebug
(
"task %d(child %d) executed and get block"
,
pTask
->
taskId
,
pTask
->
selfChildId
);
SSDataBlock
block
=
{
0
};
assignOneDataBlock
(
&
block
,
output
);
...
...
@@ -241,6 +241,8 @@ int32_t streamExec(SStreamTask* pTask) {
pRes
=
streamExecForQall
(
pTask
,
pRes
);
if
(
pRes
==
NULL
)
goto
FAIL
;
// temporarily disable status closing, since it runs out of threads
#if 0
// set status closing
atomic_store_8(&pTask->execStatus, TASK_EXEC_STATUS__CLOSING);
...
...
@@ -248,6 +250,7 @@ int32_t streamExec(SStreamTask* pTask) {
qDebug("stream exec, enter closing status");
pRes = streamExecForQall(pTask, pRes);
if (pRes == NULL) goto FAIL;
#endif
taosArrayDestroyEx
(
pRes
,
(
FDelete
)
blockDataFreeRes
);
atomic_store_8
(
&
pTask
->
execStatus
,
TASK_EXEC_STATUS__IDLE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录