Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5536c3c9
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看板
提交
5536c3c9
编写于
7月 18, 2022
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(rpc): ack connection alive
上级
da484b7a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
8 deletion
+12
-8
src/client/src/tscServer.c
src/client/src/tscServer.c
+1
-1
src/dnode/src/dnodeVRead.c
src/dnode/src/dnodeVRead.c
+0
-7
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+11
-0
未找到文件。
src/client/src/tscServer.c
浏览文件 @
5536c3c9
...
...
@@ -308,7 +308,7 @@ bool sendProbeConnMsg(SSqlObj* pSql) {
if
(
diff
>
killTimeout
)
{
// need kill query
tscDebug
(
"PROBE 0x%"
PRIx64
" need killed, noAckCnt:%d diff=%d"
,
pSql
->
self
,
pSql
->
noAckCnt
,
diff
);
return
false
;
//
return false;
}
if
(
pSql
->
pPrevContext
==
NULL
||
pSql
->
pPrevConn
==
NULL
||
pSql
->
pPrevFdObj
==
NULL
||
pSql
->
prevFd
<=
0
)
{
...
...
src/dnode/src/dnodeVRead.c
浏览文件 @
5536c3c9
...
...
@@ -57,13 +57,6 @@ void dnodeDispatchToVReadQueue(SRpcMsg *pMsg) {
int32_t
code
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
char
*
pCont
=
pMsg
->
pCont
;
// check probe conn msg
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_PROBE_CONN
)
{
SRpcMsg
rpcRsp
=
{.
handle
=
pMsg
->
handle
,
.
code
=
0
,
.
msgType
=
TSDB_MSG_TYPE_PROBE_CONN_RSP
};
rpcSendResponse
(
&
rpcRsp
);
return
;
}
while
(
leftLen
>
0
)
{
SMsgHead
*
pHead
=
(
SMsgHead
*
)
pCont
;
pHead
->
vgId
=
htonl
(
pHead
->
vgId
);
...
...
src/rpc/src/rpcMain.c
浏览文件 @
5536c3c9
...
...
@@ -993,6 +993,16 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv, SRpcReqCont
pConn
->
peerPort
=
pRecv
->
port
;
if
(
pHead
->
port
)
pConn
->
peerPort
=
htons
(
pHead
->
port
);
// probe msg
if
(
pHead
->
msgType
==
TSDB_MSG_TYPE_PROBE_CONN
)
{
pConn
->
inType
=
pHead
->
msgType
;
rpcSendQuickRsp
(
pConn
,
TSDB_CODE_SUCCESS
);
rpcUnlockConn
(
pConn
);
rpcFreeMsg
(
pRecv
->
msg
);
pRecv
->
msg
=
NULL
;
return
pConn
;
}
terrno
=
rpcCheckAuthentication
(
pConn
,
(
char
*
)
pHead
,
pRecv
->
msgLen
);
// code can be transformed only after authentication
...
...
@@ -1710,6 +1720,7 @@ bool doRpcSendProbe(SRpcConn *pConn) {
memcpy
(
pHead
->
user
,
pConn
->
user
,
tListLen
(
pHead
->
user
));
pHead
->
code
=
htonl
(
code
);
pConn
->
outType
=
pHead
->
msgType
;
bool
ret
=
rpcSendMsgToPeer
(
pConn
,
msg
,
sizeof
(
SRpcHead
)
+
sizeof
(
int32_t
));
pConn
->
secured
=
1
;
// connection shall be secured
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录