Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9cb8837a
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9cb8837a
编写于
7月 08, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
7月 08, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14659 from taosdata/fix/valgrind
fix: definite lost while send msg on dnode exiting
上级
d7956b6e
7afdd360
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
104 addition
and
13 deletion
+104
-13
source/libs/transport/src/tmsgcb.c
source/libs/transport/src/tmsgcb.c
+15
-2
tests/script/tsim/valgrind/basic2.sim
tests/script/tsim/valgrind/basic2.sim
+89
-11
未找到文件。
source/
common
/src/tmsgcb.c
→
source/
libs/transport
/src/tmsgcb.c
浏览文件 @
9cb8837a
...
...
@@ -16,20 +16,33 @@
#define _DEFAULT_SOURCE
#include "tmsgcb.h"
#include "taoserror.h"
#include "trpc.h"
static
SMsgCb
defaultMsgCb
;
void
tmsgSetDefault
(
const
SMsgCb
*
msgcb
)
{
defaultMsgCb
=
*
msgcb
;
}
int32_t
tmsgPutToQueue
(
const
SMsgCb
*
msgcb
,
EQueueType
qtype
,
SRpcMsg
*
pMsg
)
{
return
(
*
msgcb
->
putToQueueFp
)(
msgcb
->
mgmt
,
qtype
,
pMsg
);
int32_t
code
=
(
*
msgcb
->
putToQueueFp
)(
msgcb
->
mgmt
,
qtype
,
pMsg
);
if
(
code
!=
0
)
{
rpcFreeCont
(
pMsg
->
pCont
);
pMsg
->
pCont
=
NULL
;
}
return
code
;
}
int32_t
tmsgGetQueueSize
(
const
SMsgCb
*
msgcb
,
int32_t
vgId
,
EQueueType
qtype
)
{
return
(
*
msgcb
->
qsizeFp
)(
msgcb
->
mgmt
,
vgId
,
qtype
);
}
int32_t
tmsgSendReq
(
const
SEpSet
*
epSet
,
SRpcMsg
*
pMsg
)
{
return
(
*
defaultMsgCb
.
sendReqFp
)(
epSet
,
pMsg
);
}
int32_t
tmsgSendReq
(
const
SEpSet
*
epSet
,
SRpcMsg
*
pMsg
)
{
int32_t
code
=
(
*
defaultMsgCb
.
sendReqFp
)(
epSet
,
pMsg
);
if
(
code
!=
0
)
{
rpcFreeCont
(
pMsg
->
pCont
);
pMsg
->
pCont
=
NULL
;
}
return
code
;
}
void
tmsgSendRsp
(
SRpcMsg
*
pMsg
)
{
return
(
*
defaultMsgCb
.
sendRspFp
)(
pMsg
);
}
...
...
tests/script/tsim/valgrind/basic2.sim
浏览文件 @
9cb8837a
...
...
@@ -4,29 +4,107 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131
system sh/exec.sh -n dnode1 -s start -v
sql connect
print =============== step1:
create drop
show dnodes
print =============== step1: show dnodes
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ---
-
> dnode not ready!
print ---> dnode not ready!
return -1
endi
sql show dnodes
print ---
-
> $data00 $data01 $data02 $data03 $data04 $data05
print ---> $data00 $data01 $data02 $data03 $data04 $data05
if $rows != 1 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
print =============== step2: create alter drop show user
sql create user u1 pass 'taosdata'
sql show users
sql alter user u1 sysinfo 1
sql alter user u1 enable 1
sql alter user u1 pass 'taosdata'
sql drop user u1
sql_error alter user u2 sysinfo 0
print =============== step3: create drop dnode
sql create dnode $hostname port 7200
sql drop dnode 2
sql alter dnode 1 'debugflag 131'
print =============== step
2
sql create database db vgroups 1 buffer 3
sql use db
sql
create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int unsigned)
sql create table ct1 using stb tags(1000)
sql insert into ct1 values(now+0s, 10, 2.0, 3.0)
sql insert into ct1 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
print =============== step
4:
print =============== run show xxxx
sql
show dnodes
if $rows != 1 then
return -1
endi
sql show mnodes
if $rows != 1 then
return -1
endi
_OVER:
sql show databases
if $rows != 2 then
return -1
endi
sql show users
if $rows != 1 then
return -1
endi
print =============== run select * from information_schema.xxxx
sql select * from information_schema.`dnodes`
if $rows != 1 then
return -1
endi
sql select * from information_schema.`mnodes`
if $rows != 1 then
return -1
endi
sql select * from information_schema.user_users
if $rows != 1 then
return -1
endi
sql show variables;
if $rows != 4 then
return -1
endi
sql show dnode 1 variables;
if $rows <= 0 then
return -1
endi
sql show local variables;
if $rows <= 0 then
return -1
endi
print =============== stop
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check
print ----> start to check if there are ERRORS in vagrind log file for each dnode
system_content sh/checkValgrind.sh -n dnode1
print cmd return result ----> [ $system_content ]
if $system_content <= 0 then
return 0
endi
$null=
if $system_content == $null then
return 0
endi
return -1
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录