Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
2fdb4f91
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2fdb4f91
编写于
7月 29, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5235]<feature>:offload msg processing from rpc thread to tsc scheduler
上级
3aa6acfc
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
44 addition
and
8 deletion
+44
-8
src/client/src/tscParseLineProtocol.c
src/client/src/tscParseLineProtocol.c
+1
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+43
-7
未找到文件。
src/client/src/tscParseLineProtocol.c
浏览文件 @
2fdb4f91
...
...
@@ -481,7 +481,7 @@ int32_t loadTableMeta(TAOS* taos, char* tableName, SSmlSTableSchema* schema, SSm
size_t
tagIndex
=
taosArrayGetSize
(
schema
->
tags
)
-
1
;
taosHashPut
(
schema
->
tagHash
,
field
.
name
,
strlen
(
field
.
name
),
&
tagIndex
,
sizeof
(
tagIndex
));
}
tscDebug
(
"SML:0x%"
PRIx64
"
load table meta succeed.
%s, columns number: %d, tag number: %d, precision: %d"
,
tscDebug
(
"SML:0x%"
PRIx64
"
load table meta succeed. table name:
%s, columns number: %d, tag number: %d, precision: %d"
,
info
->
id
,
tableName
,
tableMeta
->
tableInfo
.
numOfColumns
,
tableMeta
->
tableInfo
.
numOfTags
,
schema
->
precision
);
free
(
tableMeta
);
tableMeta
=
NULL
;
return
code
;
...
...
src/client/src/tscServer.c
浏览文件 @
2fdb4f91
...
...
@@ -337,11 +337,16 @@ int tscSendMsgToServer(SSqlObj *pSql) {
return
TSDB_CODE_SUCCESS
;
}
void
tscProcessMsgFromServer
(
SRpcMsg
*
rpcMsg
,
SRpcEpSet
*
pEpSet
)
{
static
void
doProcessMsgFromServer
(
SSchedMsg
*
pSchedMsg
)
{
SRpcMsg
*
rpcMsg
=
pSchedMsg
->
ahandle
;
SRpcEpSet
*
pEpSet
=
pSchedMsg
->
thandle
;
TSDB_CACHE_PTR_TYPE
handle
=
(
TSDB_CACHE_PTR_TYPE
)
rpcMsg
->
ahandle
;
SSqlObj
*
pSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
if
(
pSql
==
NULL
)
{
rpcFreeCont
(
rpcMsg
->
pCont
);
free
(
rpcMsg
);
free
(
pEpSet
);
return
;
}
...
...
@@ -359,6 +364,8 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
taosRemoveRef
(
tscObjRef
,
handle
);
taosReleaseRef
(
tscObjRef
,
handle
);
rpcFreeCont
(
rpcMsg
->
pCont
);
free
(
rpcMsg
);
free
(
pEpSet
);
return
;
}
...
...
@@ -370,6 +377,8 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
taosRemoveRef
(
tscObjRef
,
handle
);
taosReleaseRef
(
tscObjRef
,
handle
);
rpcFreeCont
(
rpcMsg
->
pCont
);
free
(
rpcMsg
);
free
(
pEpSet
);
return
;
}
...
...
@@ -422,6 +431,8 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
if
(
rpcMsg
->
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
)
{
taosReleaseRef
(
tscObjRef
,
handle
);
rpcFreeCont
(
rpcMsg
->
pCont
);
free
(
rpcMsg
);
free
(
pEpSet
);
return
;
}
}
...
...
@@ -499,6 +510,31 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
taosReleaseRef
(
tscObjRef
,
handle
);
rpcFreeCont
(
rpcMsg
->
pCont
);
free
(
rpcMsg
);
free
(
pEpSet
);
}
void
tscProcessMsgFromServer
(
SRpcMsg
*
rpcMsg
,
SRpcEpSet
*
pEpSet
)
{
SSchedMsg
schedMsg
=
{
0
};
schedMsg
.
fp
=
doProcessMsgFromServer
;
SRpcMsg
*
rpcMsgCopy
=
calloc
(
1
,
sizeof
(
SRpcMsg
));
memcpy
(
rpcMsgCopy
,
rpcMsg
,
sizeof
(
struct
SRpcMsg
));
rpcMsgCopy
->
pCont
=
rpcMallocCont
(
rpcMsg
->
contLen
);
memcpy
(
rpcMsgCopy
->
pCont
,
rpcMsg
->
pCont
,
rpcMsg
->
contLen
);
schedMsg
.
ahandle
=
(
void
*
)
rpcMsgCopy
;
SRpcEpSet
*
pEpSetCopy
=
NULL
;
if
(
pEpSet
!=
NULL
)
{
pEpSetCopy
=
calloc
(
1
,
sizeof
(
SRpcEpSet
));
memcpy
(
pEpSetCopy
,
pEpSet
,
sizeof
(
SRpcEpSet
));
}
schedMsg
.
thandle
=
(
void
*
)
pEpSetCopy
;
schedMsg
.
msg
=
NULL
;
taosScheduleTask
(
tscQhandle
,
&
schedMsg
);
}
int
doBuildAndSendMsg
(
SSqlObj
*
pSql
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录